1 2017-04-05 Pedro Alves <palves@redhat.com>
3 * configure: Regenerate.
5 2017-04-05 Pedro Alves <palves@redhat.com>
7 * gdbreplay.c (sync_error): Constify.
8 * linux-x86-low.c (push_opcode): Constify.
10 2017-04-05 Pedro Alves <palves@redhat.com>
12 * win32-low.c (get_child_debug_event)
13 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
14 Report TARGET_WAITKIND_SPURIOUS instead.
16 2017-04-05 Pedro Alves <palves@redhat.com>
18 * remote-utils.c (remote_prepare, remote_open): Constify.
19 * remote-utils.h (remote_prepare, remote_open): Constify.
20 * server.c (captured_main): Constify 'port' handling.
22 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
24 * Makefile.in (clean): Clear .deps.
26 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
28 * .gitignore: Remove generated files, replace with wildcard.
29 * (clean): Replace removal of generated files with wildcard.
30 (version.c): Replace with...
31 (version-generated.c): ...this.
32 (xml-builtin.c): Replace with...
33 (xml-builtin-generated.c): ...this.
34 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
35 (%.c: *regformats*): Replace with...
36 (%-generated.c: *regformats*): ...this.
38 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
40 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
41 (xtensa_fill_gregset): Call collect_register_by_name for
43 (xtensa_store_gregset): Call supply_register_by_name for
46 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
48 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
49 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
50 (xtensa_store_gregset): Call supply_register for all registers in
51 a0_regnum..a0_regnum + C0_NREGS range.
53 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
55 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
56 (ax-ipa.o: ax.c): Remove.
57 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
58 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
59 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
60 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
61 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
63 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
65 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
66 (print-utils-ipa.o: ../common/print-utils.c): Remove.
67 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
68 (errors-ipa.o: ../common/errors.c): Remove.
69 (format-ipa.o: ../common/format.c): Remove.
70 (common-utils-ipa.o: ../common/common-utils.c): Remove.
72 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
74 * Makefile.in (%-ipa.o: %.c): New rule.
75 (tracepoint-ipa.o: tracepoint.c): Remove.
76 (utils-ipa.o: utils.c): Remove.
77 (remote-utils-ipa.o: remote-utils.c): Remove.
78 (regcache-ipa.o: regcache.c): Remove.
79 (i386-linux-ipa.o: i386-linux.c): Remove.
80 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
81 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
82 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
83 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
84 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
85 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
86 (amd64-linux-ipa.o: amd64-linux.c): Remove.
87 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
88 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
89 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
90 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
91 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
92 (aarch64-ipa.o: aarch64.c): Remove.
93 (s390-linux32-ipa.o: s390-linux32.c): Remove.
94 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
95 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
96 (s390-linux64-ipa.o: s390-linux64.c): Remove.
97 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
98 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
99 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
100 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
101 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
102 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
103 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
104 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
105 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
106 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
107 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
108 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
109 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
110 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
111 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
112 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
113 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
114 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
115 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
116 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
117 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
118 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
119 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
120 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
121 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
122 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
123 (tdesc-ipa.o: tdesc.c): Remove.
124 (x32-linux-ipa.o: x32-linux.c): Remove.
125 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
126 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
128 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
130 * Makefile.in (%.o: ../arch/%.c): New rule.
131 (arm.o: ../arch/arm.c): Remove.
132 (arm-linux.o: ../arch/arm-linux.c): Remove.
133 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
134 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
136 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
138 * Makefile.in (%.o: ../nat/%.c): New rule.
139 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
140 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
141 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
142 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
143 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
144 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
145 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
146 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
147 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
148 (linux-personality.o: ../nat/linux-personality.c): Remove.
149 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
150 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
151 (x86-linux.o: ../nat/x86-linux.c): Remove.
152 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
153 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
155 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
157 * Makefile.in (%.o: ../common/%.c): New rule.
158 (signals.o: ../common/signals.c): Remove.
159 (print-utils.o: ../common/print-utils.c): Remove.
160 (rsp-low.o: ../common/rsp-low.c): Remove.
161 (common-utils.o: ../common/common-utils.c): Remove.
162 (posix-strerror.o: ../common/posix-strerror.c): Remove.
163 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
164 (vec.o: ../common/vec.c): Remove.
165 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
166 (xml-utils.o: ../common/xml-utils.c): Remove.
167 (ptid.o: ../common/ptid.c): Remove.
168 (buffer.o: ../common/buffer.c): Remove.
169 (format.o: ../common/format.c): Remove.
170 (filestuff.o: ../common/filestuff.c): Remove.
171 (agent.o: ../common/agent.c): Remove.
172 (errors.o: ../common/errors.c): Remove.
173 (environ.o: ../common/environ.c): Remove.
174 (common-debug.o: ../common/common-debug.c): Remove.
175 (cleanups.o: ../common/cleanups.c): Remove.
176 (common-exceptions.o: ../common/common-exceptions.c): Remove.
177 (fileio.o: ../common/fileio.c): Remove.
178 (common-regcache.o: ../common/common-regcache.c): Remove.
179 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
180 (new-op.o: ../common/new-op.c): Remove.
181 (btrace-common.o: ../common/btrace-common.c): Remove.
183 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
185 * Makefile.in (%.o: ../target/%.c): New rule.
186 (waitstatus.o: ../target/waitstatus.c): Remove.
188 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
191 (%.c: ../regformats/%.dat,
192 (%.c: ../regformats/arm/%.dat,
193 (%.c: ../regformats/i386/%.dat,
194 (%.c: ../regformats/rs6000/%.dat): New rules.
197 (arm-with-iwmmxt.c): Remove.
198 (arm-with-vfpv2.c): Remove.
199 (arm-with-vfpv3.c): Remove.
200 (arm-with-neon.c): Remove.
201 (reg-bfin.c): Remove.
202 (reg-cris.c): Remove.
203 (reg-crisv32.c): Remove.
205 (i386-linux.c): Remove.
206 (i386-avx.c): Remove.
207 (i386-avx-linux.c): Remove.
208 (i386-avx-avx512.c): Remove.
209 (i386-avx-avx512-linux.c): Remove.
210 (i386-mpx.c): Remove.
211 (i386-mpx-linux.c): Remove.
212 (i386-avx-mpx-avx512-pku.c): Remove.
213 (i386-avx-mpx-avx512-pku-linux.c): Remove.
214 (i386-avx-mpx.c): Remove.
215 (i386-avx-mpx-linux.c): Remove.
216 (i386-mmx.c): Remove.
217 (i386-mmx-linux.c): Remove.
218 (reg-ia64.c): Remove.
219 (reg-m32r.c): Remove.
220 (reg-m68k.c): Remove.
222 (mips-linux.c): Remove.
223 (mips-dsp-linux.c): Remove.
224 (mips64-linux.c): Remove.
225 (mips64-dsp-linux.c): Remove.
226 (nios2-linux.c): Remove.
227 (powerpc-32.c): Remove.
228 (powerpc-32l.c): Remove.
229 (powerpc-altivec32l.c): Remove.
230 (powerpc-cell32l.c): Remove.
231 (powerpc-vsx32l.c): Remove.
232 (powerpc-isa205-32l.c): Remove.
233 (powerpc-isa205-altivec32l.c): Remove.
234 (powerpc-isa205-vsx32l.c): Remove.
235 (powerpc-e500l.c): Remove.
236 (powerpc-64l.c): Remove.
237 (powerpc-altivec64l.c): Remove.
238 (powerpc-cell64l.c): Remove.
239 (powerpc-vsx64l.c): Remove.
240 (powerpc-isa205-64l.c): Remove.
241 (powerpc-isa205-altivec64l.c): Remove.
242 (powerpc-isa205-vsx64l.c): Remove.
243 (s390-linux32.c): Remove.
244 (s390-linux32v1.c): Remove.
245 (s390-linux32v2.c): Remove.
246 (s390-linux64.c): Remove.
247 (s390-linux64v1.c): Remove.
248 (s390-linux64v2.c): Remove.
249 (s390-te-linux64.c): Remove.
250 (s390-vx-linux64.c): Remove.
251 (s390-tevx-linux64.c): Remove.
252 (s390x-linux64.c): Remove.
253 (s390x-linux64v1.c): Remove.
254 (s390x-linux64v2.c): Remove.
255 (s390x-te-linux64.c): Remove.
256 (s390x-vx-linux64.c): Remove.
257 (s390x-tevx-linux64.c): Remove.
258 (tic6x-c64xp-linux.c): Remove.
259 (tic6x-c64x-linux.c): Remove.
260 (tic6x-c62x-linux.c): Remove.
262 (reg-sparc64.c): Remove.
265 (amd64-linux.c): Remove.
266 (amd64-avx.c): Remove.
267 (amd64-avx-linux.c): Remove.
268 (amd64-avx-avx512.c): Remove.
269 (amd64-avx-avx512-linux.c): Remove.
270 (amd64-mpx.c): Remove.
271 (amd64-mpx-linux.c): Remove.
272 (amd64-avx-mpx-avx512-pku.c): Remove.
273 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
274 (amd64-avx-mpx.c): Remove.
275 (amd64-avx-mpx-linux.c): Remove.
277 (x32-linux.c): Remove.
279 (x32-avx-linux.c): Remove.
280 (x32-avx-avx512.c): Remove.
281 (x32-avx-avx512-linux.c): Remove.
282 (reg-xtensa.c): Remove.
283 (reg-tilegx.c): Remove.
284 (reg-tilegx32.c): Remove.
286 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
288 * Makefile.in (SFILES): Add "common/environ.c".
289 (OBJS): Add "common/environ.h".
291 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
293 * configure.ac: Check if the fs_base and gs_base members of
294 `struct user_regs_struct' exist.
295 * config.in: Regenerated.
296 * configure: Likewise.
298 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
300 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
302 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
303 (get_next_pcs_syscall_next_pc): Likewise.
305 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
307 * win32-i386-low.c: Fix incorrect reference to a couple source files.
308 * nto-x86-low.c: Likewise.
310 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
312 * Makefile.in: Include disable-implicit-rules.mk.
314 2016-11-23 Pedro Alves <palves@redhat.com>
316 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
317 (debug_vprintf): Use std::chrono::steady_clock instead of
318 gettimeofday. Use '.' instead of ':'.
319 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
320 (get_timestamp): Use std::chrono::steady_clock instead of
323 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
325 * Makefile.in: Fix whitespace formatting.
327 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
329 * Makefile.in (SFILES, OBS): Flatten list and order
332 2016-11-23 Pedro Alves <palves@redhat.com>
334 * event-loop.c (handle_file_event): Use warning.
335 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
336 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
339 2016-11-23 Pedro Alves <palves@redhat.com>
341 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
343 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
344 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
345 debug_printf and debug_flush for debug output.
346 * server.c (handle_general_set): Likewise.
347 * thread-db.c (try_thread_db_load): Use debug_printf for debug
350 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
352 * Makefile.in (.c.o): Replace rule with ...
353 (%.o: %.c): ... this one.
355 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
357 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
358 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
360 * configure.ac: Remove checks for the make program.
361 * configure: Re-generate.
363 2016-10-28 Pedro Alves <palves@redhat.com>
365 * Makefile.in (CXX_DIALECT): Get from configure.
366 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
367 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
368 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
369 * config.in: Regenerate.
370 * configure: Regenerate.
372 2016-10-27 Yao Qi <yao.qi@linaro.org>
374 * linux-low.c (linux_supports_range_stepping): Return true if
375 can_software_single_step return true.
377 2016-10-27 Yao Qi <yao.qi@linaro.org>
379 * inferiors.c (find_inferior_in_random): New function.
380 * inferiors.h (find_inferior_in_random): Declare.
381 * linux-low.c (linux_wait_for_event_filtered): Call
382 find_inferior_in_random instead of find_inferior.
384 2016-10-27 Yao Qi <yao.qi@linaro.org>
386 * linux-low.c (linux_wait_1): If single-step breakpoints are
387 inserted, remove them.
389 2016-10-26 Pedro Alves <palves@redhat.com>
391 * linux-low.c (handle_extended_wait): Link parent/child fork
393 (linux_wait_1): Unlink them.
394 (linux_set_resume_request): Ignore resume requests for
395 already-resumed and unhandled fork child threads.
396 * linux-low.h (struct lwp_info) <fork_relative>: New field.
397 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
399 (handle_v_requests) <vCont>: Don't call require_running.
400 * server.h (in_queued_stop_replies): New declaration.
402 2016-10-24 Yao Qi <yao.qi@linaro.org>
405 * linux-aarch64-low.c (append_insns): Cast the return value to
408 2016-10-10 Yao Qi <yao.qi@linaro.org>
410 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
412 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
414 * target.c (target_supports_multi_process): New function, moved
416 * target.h (target_supports_multi_process): ... here. Remove
419 2016-10-05 Tom Tromey <tom@tromey.com>
422 * tracepoint.c (handle_tracepoint_bkpts): Check
423 ipa_error_tracepoint, not ipa_stopping_tracepoint.
425 2016-10-05 Yao Qi <yao.qi@linaro.org>
427 * configure.srv: Update the path of arm-*.xml files.
429 2016-10-05 Terry Guo <terry.guo@arm.com>
430 Yao Qi <yao.qi@linaro.org>
432 * Makefile.in: Adjust the path of rules.
433 * configure.srv: Update the path of xml files.
434 * regformats/arm-with-iwmmxt.dat: Regenerated.
435 * regformats/arm-with-neon.dat: Likewise.
436 * regformats/arm-with-vfpv2.dat: Likewise.
437 * regformats/arm-with-vfpv3.dat Likewise.
439 2016-09-30 Yao Qi <yao.qi@linaro.org>
442 * target.c (target_stop_and_wait): Don't call
443 target_continue_no_signal, use resume_stop instead.
445 2016-09-26 Yao Qi <yao.qi@linaro.org>
447 * linux-low.c (linux_wait_1): Call debug_exit.
449 2016-09-23 Pedro Alves <palves@redhat.com>
451 * Makefile.in (SFILES): Add common/new-op.c.
452 (OBS): Add common/new-op.o.
453 (new-op.o): New rule.
455 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
457 * .gitinore: Ignore more files.
459 2016-09-21 Yao Qi <yao.qi@linaro.org>
461 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
464 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
466 * server.c (start_inferior): Call target_mourn_inferior instead of
467 mourn_inferior; pass ptid_t argument to it.
469 (handle_target_event): Likewise.
470 * target.c (target_mourn_inferior): New function.
471 * target.h (mourn_inferior): Delete macro.
473 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
475 * linux-low.c (lwp_is_stepping): New function.
477 2016-09-06 Carl Love <cel@us.ibm.com>
479 * server.c (start_inferior): Fixed comment, requested comment change
480 didn't get updated correctly. Removed reference to ptrace () call as
481 it is only true on Linux systems.
483 2016-09-06 Carl Love <cel@us.ibm.com>
485 * server.c (start_inferior): Do not call
486 function target_post_create_inferior () if the
487 inferior process has already exited.
489 2016-09-05 Pedro Alves <palves@redhat.com>
491 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
492 (COMPILE.pre, CC_LD): Use CXX directly.
493 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
494 * acinclude.m4: Don't include build-with-cxx.m4.
495 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
496 * configure: Regenerate.
498 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
501 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
502 call writing data to own_buf.
504 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
506 * target.c (mywait): Call target_wait instead of
508 (target_wait): New function.
510 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
512 * server.c (start_inferior): New variable 'ptid'. Replace calls
513 to the_target->resume by target_continue{,_no_signal}, depending
515 * target.c (target_stop_and_wait): Call target_continue_no_signal
516 instead of the_target->resume.
517 (target_continue): New function.
519 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
521 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
523 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
526 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
528 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
529 * linux-arm-low.c (ps_get_thread_area): Likewise.
530 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
531 * linux-m68k-low.c (ps_get_thread_area): Likewise.
532 * linux-mips-low.c (ps_get_thread_area): Likewise.
533 * linux-nios2-low.c (ps_get_thread_area): Likewise.
534 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
535 * linux-x86-low.c (ps_get_thread_area): Likewise.
536 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
538 2016-08-19 Pedro Alves <palves@redhat.com>
540 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
542 2016-08-19 Pedro Alves <palves@redhat.com>
544 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
545 comment. Use memcpy instead of casting through unsigned long.
547 2016-08-19 Pedro Alves <palves@redhat.com>
549 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
550 allocating around 0x80000000.
552 2016-08-19 Pedro Alves <palves@redhat.com>
555 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
556 (x32-avx512-linux-ipa.o): New rules.
557 * configure.ac (x86_64-*-linux*): New x32 check.
558 * configure.srv (ipa_x32_linux_regobj): New.
559 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
560 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
562 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
564 * configure: Regenerate.
566 2016-08-09 Pedro Alves <palves@redhat.com>
569 * Makefile.in (OBS): Add signals-state-save-restore.o.
570 (signals-state-save-restore.o): New rule.
571 * config.in: Regenerate.
572 * configure: Regenerate.
573 * linux-low.c: Include "signals-state-save-restore.h".
574 (linux_create_inferior): Call
575 restore_original_signals_state.
576 * server.c: Include "dispositions-save-restore.h".
577 (captured_main): Call save_original_signals_state.
579 2016-08-05 Pedro Alves <palves@redhat.com>
581 * configure: Regenerate.
583 2016-08-04 Yao Qi <yao.qi@linaro.org>
585 * linux-low.c (regsets_fetch_inferior_registers): Check
586 errno is ESRCH or not.
588 2016-08-02 Yao Qi <yao.qi@linaro.org>
590 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
591 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
592 (thread_db_load_search): Update.
593 (try_thread_db_load_1): Don't look for td_ta_event_addr,
594 td_ta_set_event and td_ta_event_getmsg.
596 2016-07-26 Pedro Alves <palves@redhat.com>
599 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
600 of unsigned long for 64-bit registers and use uint32_t instead of
601 unsigned int for 32-bit registers.
603 2016-07-26 Pedro Alves <palves@redhat.com>
605 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
608 2016-07-21 Tom Tromey <tom@tromey.com>
610 * configure: Rebuild.
612 2016-07-21 Yao Qi <yao.qi@linaro.org>
614 * mem-break.c (find_gdb_breakpoint): Cast bp to
615 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
617 2016-07-21 Yao Qi <yao.qi@linaro.org>
619 * server.c (handle_v_requests): Support s and S actions
620 if target_supports_software_single_step return true.
622 2016-07-21 Yao Qi <yao.qi@linaro.org>
624 * linux-low.c (resume_stopped_resumed_lwps): If resume request
625 is resume_step, call maybe_hw_step.
626 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
628 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
630 (proceed_one_lwp): If resume request is resume_step, install
631 reinsert breakpoints and call maybe_hw_step.
633 2016-07-21 Yao Qi <yao.qi@linaro.org>
635 * linux-low.c (proceed_one_lwp): Declare.
636 (linux_resume_one_thread): Remove local variable 'step'.
637 Lift code enqueue signal. Call proceed_one_lwp instead of
638 linux_resume_one_lwp.
640 2016-07-21 Yao Qi <yao.qi@linaro.org>
642 * linux-low.c (linux_resume_one_thread): Call
643 enqueue_pending_signal.
645 2016-07-21 Yao Qi <yao.qi@linaro.org>
647 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
648 * inferiors.c (do_restore_current_thread_cleanup): New function.
649 (make_cleanup_restore_current_thread): Likewise.
650 * linux-low.c (install_software_single_step_breakpoints): Call
651 make_cleanup_restore_current_thread. Switch current_thread to
654 2016-07-21 Yao Qi <yao.qi@linaro.org>
656 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
657 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
658 (clone_one_breakpoint): Likewise.
659 (delete_reinsert_breakpoints): Change parameter to thread.
661 (has_reinsert_breakpoints): Likewise.
662 (uninsert_reinsert_breakpoints): Likewise.
663 (reinsert_reinsert_breakpoints): Likewise.
664 * mem-break.h (set_reinsert_breakpoint): Update declaration.
665 (delete_reinsert_breakpoints): Likewise.
666 (reinsert_reinsert_breakpoints): Likewise.
667 (uninsert_reinsert_breakpoints): Likewise.
668 (has_reinsert_breakpoints): Likewise.
670 2016-07-21 Yao Qi <yao.qi@linaro.org>
672 * inferiors.c (get_thread_process): Make parameter const.
673 * inferiors.h (get_thread_process): Update declaration.
674 * mem-break.c (clone_all_breakpoints): Remove all parameters.
675 Add new parameters child_thread and parent_thread. Callers
677 * mem-break.h (clone_all_breakpoints): Update declaration.
679 2016-07-21 Yao Qi <yao.qi@linaro.org>
681 * mem-break.c (struct breakpoint) <cond_list>: Remove.
682 <command_list, handler>: Remove.
683 (struct gdb_breakpoint): New.
684 (struct other_breakpoint): New.
685 (struct reinsert_breakpoint): New.
686 (is_gdb_breakpoint): New function.
687 (any_persistent_commands): Update command_list if
688 is_gdb_breakpoint returns true.
689 (set_breakpoint): Create breakpoints according to their types.
690 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
691 (set_gdb_breakpoint_1): Likewise.
692 (set_gdb_breakpoint): Likewise.
693 (clear_breakpoint_conditions): Change parameter type to
694 'struct gdb_breakpoint *'.
695 (clear_breakpoint_commands): Likewise.
696 (clear_breakpoint_conditions_and_commands): Likewise.
697 (add_condition_to_breakpoint): Likewise.
698 (add_breakpoint_condition): Likewise.
699 (add_commands_to_breakpoint): Likewise.
700 (check_breakpoints): Check other_breakpoint.
701 (clone_one_breakpoint): Clone breakpopint according to its type.
702 * mem-break.h (struct gdb_breakpoint): Declare.
703 (set_gdb_breakpoint): Update declaration.
704 (clear_breakpoint_conditions_and_commands): Likewise.
705 (add_breakpoint_condition): Likewise.
706 (add_breakpoint_commands): Likewise.
707 * server.c (process_point_options): Change parameter type to
708 'struct gdb_breakpoint *'.
710 2016-07-21 Yao Qi <yao.qi@linaro.org>
712 * mem-break.c (set_breakpoint_at): Rename it to ...
713 (set_breakpoint_type_at): ... it.
714 (set_breakpoint_at): Call set_breakpoint_type_at.
715 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
716 * mem-break.h (set_breakpoint_at): Update comments.
718 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
720 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
722 (nios2_store_gregset): Likewise.
724 2016-07-01 Pedro Alves <palves@redhat.com>
725 Antoine Tremblay <antoine.tremblay@ericsson.com>
727 * linux-low.c: Change interface to take the target lwp_info
728 pointer directly and return void. Handle detaching from a zombie
730 (linux_detach_lwp_callback): New function.
731 (linux_detach): Detach from the leader thread after detaching from
734 2016-06-28 Yao Qi <yao.qi@linaro.org>
736 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
737 for variable new_offset.
738 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
739 (aarch64_ftrace_insn_reloc_cb): Likewise.
740 (aarch64_ftrace_insn_reloc_tb): Likewise.
741 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
742 PRIx64 instead of PRIx32.
744 2016-06-28 Yao Qi <yao.qi@linaro.org>
746 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
747 (the_low_target): Install arm_get_syscall_trapinfo.
749 2016-06-28 Yao Qi <yao.qi@linaro.org>
751 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
753 (the_low_target): Install aarch64_get_syscall_trapinfo.
755 2016-06-28 Yao Qi <yao.qi@linaro.org>
757 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
759 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
760 Remove parameter sysno.
761 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
764 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
766 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
767 (s390_emit_ne_goto): Likewise.
768 (s390_emit_lt_goto): Likewise.
769 (s390_emit_le_goto): Likewise.
770 (s390_emit_gt_goto): Likewise.
771 (s390_emit_ge_goto): Likewise.
772 (s390x_emit_eq_goto): Likewise.
773 (s390x_emit_ne_goto): Likewise.
774 (s390x_emit_lt_goto): Likewise.
775 (s390x_emit_le_goto): Likewise.
776 (s390x_emit_gt_goto): Likewise.
777 (s390x_emit_ge_goto): Likewise.
778 (s390_emit_ops_impl): Mark variable static.
779 (s390x_emit_ops): Likewise.
781 2016-06-17 Yao Qi <yao.qi@linaro.org>
783 * linux-low.c (handle_extended_wait): Call
784 uninsert_reinsert_breakpoints for the parent process. Remove
785 reinsert breakpoints from the child process. Reinsert them to
786 the parent process when vfork is done.
787 * mem-break.c (uninsert_reinsert_breakpoints): New function.
788 (reinsert_reinsert_breakpoints): New function.
789 * mem-break.h (uninsert_reinsert_breakpoints): Declare
790 (reinsert_reinsert_breakpoints): Declare.
792 2016-06-17 Yao Qi <yao.qi@linaro.org>
794 * linux-low.c (handle_extended_wait): If the parent is doing
795 step-over, remove the reinsert breakpoints from the forked child.
797 2016-06-17 Yao Qi <yao.qi@linaro.org>
799 * linux-low.c (unsuspend_all_lwps): Declare.
800 (linux_low_filter_event): If thread exited, call finish_step_over.
801 If step-over is finished, unsuspend other threads.
803 2016-06-17 Yao Qi <yao.qi@linaro.org>
805 * linux-low.c (linux_resume_one_lwp_throw): Assert
806 has_reinsert_breakpoints returns false.
807 * mem-break.c (delete_disabled_breakpoints): Assert
808 bp type isn't reinsert_breakpoint.
810 2016-06-17 Yao Qi <yao.qi@linaro.org>
812 * linux-low.c (maybe_hw_step): New function.
813 (linux_resume_one_lwp_throw): Call maybe_hw_step.
814 (finish_step_over): Switch current_thread to lwp temporarily,
815 and assert has_reinsert_breakpoints returns true.
816 (proceed_one_lwp): Call maybe_hw_step.
817 * mem-break.c (has_reinsert_breakpoints): New function.
818 * mem-break.h (has_reinsert_breakpoints): Declare.
820 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
822 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
824 2016-05-17 Yao Qi <yao.qi@linaro.org>
826 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
827 instead of find_inferior.
829 2016-05-05 Yao Qi <yao.qi@linaro.org>
831 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
832 Initialize res to zero.
834 2016-05-05 Yao Qi <yao.qi@linaro.org>
836 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
839 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
841 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
842 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
843 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
845 2016-04-28 Par Olsson <par.olsson@windriver.com>
846 Simon Marchi <simon.marchi@ericsson.com>
848 * tracepoint.c (write_inferior_int8): New function.
849 (cmd_qtenable_disable): Write enable flag using
852 2016-04-25 Yao Qi <yao.qi@linaro.org>
854 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
855 (need_step_over_p): Return zero if the LWP has pending signals
856 can be delivered on software single step target.
858 2016-04-25 Yao Qi <yao.qi@linaro.org>
860 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
861 return instead of error.
863 2016-04-22 Yao Qi <yao.qi@linaro.org>
865 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
868 2016-04-22 Yao Qi <yao.qi@linaro.org>
870 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
871 signal when stepping over breakpoint with software single
874 2016-04-21 Pedro Alves <palves@redhat.com>
876 * linux-s390-low.c (s390_collect_ptrace_register)
877 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
879 (s390_check_regset): Use void * instead of gdb_byte *.
881 2016-04-20 Pedro Alves <palves@redhat.com>
883 * configure: Renegerate.
885 2016-04-20 Yao Qi <yao.qi@linaro.org>
887 * linux-aarch32-low.c: Include "arch/arm-linux.h".
888 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
890 (arm_store_gregset): Likewise.
892 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
894 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
895 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
896 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
897 (amd64-avx-mpx-linux.c): New rules.
898 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
899 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
900 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
901 (srv_amd64_regobj): Add amd64-avx-mpx.o.
902 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
903 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
904 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
905 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
906 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
907 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
908 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
909 * linux-x86-low.c (x86_linux_read_description): Add case for
910 X86_XSTATE_AVX_MPX_MASK.
911 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
912 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
913 init_registers_i386_avx_mpx_linux.
914 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
915 (initialize_low_tracepoint): Call
916 init_registers_i386_avx_mpx_linux.
917 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
918 (initialize_low_tracepoint): Call
919 init_registers_amd64_avx_mpx_linux.
920 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
921 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
922 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
925 2016-04-18 Pedro Alves <palves@redhat.com>
927 * configure: Regenerate.
929 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
931 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
932 (aarch64_emit_sub): Likewise.
934 2016-04-12 Pedro Alves <palves@redhat.com>
936 * utils.c (prepare_to_throw_exception): Delete.
938 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
940 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
942 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
944 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
946 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
948 * linux-aarch64-ipa.c: Add <elf.h> include.
949 * linux-ppc-ipa.c: Add <elf.h> include.
950 * linux-s390-ipa.c: Add <elf.h> include.
952 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
954 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
955 (get_raw_reg_ptr): Likewise.
956 (get_trace_state_variable_value_ptr): Likewise.
957 (set_trace_state_variable_value_ptr): Likewise.
958 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
961 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
962 Marcin Kościelnicki <koriakin@0x04.net>
965 * linux-ppc-low.c (emit_insns): New function.
966 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
967 (ppc_emit_prologue): New function.
968 (ppc_emit_epilogue): New function.
969 (ppc_emit_add): New function.
970 (ppc_emit_sub): New function.
971 (ppc_emit_mul): New function.
972 (ppc_emit_lsh): New function.
973 (ppc_emit_rsh_signed): New function.
974 (ppc_emit_rsh_unsigned): New function.
975 (ppc_emit_ext): New function.
976 (ppc_emit_zero_ext): New function.
977 (ppc_emit_log_not): New function.
978 (ppc_emit_bit_and): New function.
979 (ppc_emit_bit_or): New function.
980 (ppc_emit_bit_xor): New function.
981 (ppc_emit_bit_not): New function.
982 (ppc_emit_equal): New function.
983 (ppc_emit_less_signed): New function.
984 (ppc_emit_less_unsigned): New function.
985 (ppc_emit_ref): New function.
986 (ppc_emit_const): New function.
987 (ppc_emit_reg): New function.
988 (ppc_emit_pop): New function.
989 (ppc_emit_stack_flush): New function.
990 (ppc_emit_swap): New function.
991 (ppc_emit_stack_adjust): New function.
992 (ppc_emit_call): New function.
993 (ppc_emit_int_call_1): New function.
994 (ppc_emit_void_call_2): New function.
995 (ppc_emit_if_goto): New function.
996 (ppc_emit_goto): New function.
997 (ppc_emit_eq_goto): New function.
998 (ppc_emit_ne_goto): New function.
999 (ppc_emit_lt_goto): New function.
1000 (ppc_emit_le_goto): New function.
1001 (ppc_emit_gt_goto): New function.
1002 (ppc_emit_ge_goto): New function.
1003 (ppc_write_goto_address): New function.
1004 (ppc_emit_ops_impl): New static variable.
1005 (ppc64v1_emit_prologue): New function.
1006 (ppc64v2_emit_prologue): New function.
1007 (ppc64_emit_epilogue): New function.
1008 (ppc64_emit_add): New function.
1009 (ppc64_emit_sub): New function.
1010 (ppc64_emit_mul): New function.
1011 (ppc64_emit_lsh): New function.
1012 (ppc64_emit_rsh_signed): New function.
1013 (ppc64_emit_rsh_unsigned): New function.
1014 (ppc64_emit_ext): New function.
1015 (ppc64_emit_zero_ext): New function.
1016 (ppc64_emit_log_not): New function.
1017 (ppc64_emit_bit_and): New function.
1018 (ppc64_emit_bit_or): New function.
1019 (ppc64_emit_bit_xor): New function.
1020 (ppc64_emit_bit_not): New function.
1021 (ppc64_emit_equal): New function.
1022 (ppc64_emit_less_signed): New function.
1023 (ppc64_emit_less_unsigned): New function.
1024 (ppc64_emit_ref): New function.
1025 (ppc64_emit_const): New function.
1026 (ppc64v1_emit_reg): New function.
1027 (ppc64v2_emit_reg): New function.
1028 (ppc64_emit_pop): New function.
1029 (ppc64_emit_stack_flush): New function.
1030 (ppc64_emit_swap): New function.
1031 (ppc64v1_emit_call): New function.
1032 (ppc64v2_emit_call): New function.
1033 (ppc64v1_emit_int_call_1): New function.
1034 (ppc64v2_emit_int_call_1): New function.
1035 (ppc64v1_emit_void_call_2): New function.
1036 (ppc64v2_emit_void_call_2): New function.
1037 (ppc64_emit_if_goto): New function.
1038 (ppc64_emit_eq_goto): New function.
1039 (ppc64_emit_ne_goto): New function.
1040 (ppc64_emit_lt_goto): New function.
1041 (ppc64_emit_le_goto): New function.
1042 (ppc64_emit_gt_goto): New function.
1043 (ppc64_emit_ge_goto): New function.
1044 (ppc64v1_emit_ops_impl): New static variable.
1045 (ppc64v2_emit_ops_impl): New static variable.
1046 (ppc_emit_ops): New function.
1047 (linux_low_target): Wire in ppc_emit_ops.
1049 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1050 Marcin Kościelnicki <koriakin@0x04.net>
1053 * Makefile.in: Add powerpc-*-ipa.o
1054 * configure.srv: Add ipa_obj for powerpc*-linux.
1055 * linux-ppc-ipa.c: New file.
1056 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1058 (PPC_FIELD): New macro.
1059 (PPC_SEXT): New macro.
1060 (PPC_OP6): New macro.
1061 (PPC_BO): New macro.
1062 (PPC_LI): New macro.
1063 (PPC_BD): New macro.
1064 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1065 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1066 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1067 (ppc_get_thread_area): New function.
1068 (is_elfv2_inferior): New function.
1069 (gen_ds_form): New function.
1070 (GEN_STD): New macro.
1071 (GEN_STDU): New macro.
1072 (GEN_LD): New macro.
1073 (GEN_LDU): New macro.
1074 (gen_d_form): New function.
1075 (GEN_ADDI): New macro.
1076 (GEN_ADDIS): New macro.
1077 (GEN_LI): New macro.
1078 (GEN_LIS): New macro.
1079 (GEN_ORI): New macro.
1080 (GEN_ORIS): New macro.
1081 (GEN_LWZ): New macro.
1082 (GEN_STW): New macro.
1083 (GEN_STWU): New macro.
1084 (gen_xfx_form): New function.
1085 (GEN_MFSPR): New macro.
1086 (GEN_MTSPR): New macro.
1087 (GEN_MFCR): New macro.
1088 (GEN_MTCR): New macro.
1089 (GEN_SYNC): New macro.
1090 (GEN_LWSYNC): New macro.
1091 (gen_x_form): New function.
1092 (GEN_OR): New macro.
1093 (GEN_MR): New macro.
1094 (GEN_LWARX): New macro.
1095 (GEN_STWCX): New macro.
1096 (GEN_CMPW): New macro.
1097 (gen_md_form): New function.
1098 (GEN_RLDICL): New macro.
1099 (GEN_RLDICR): New macro.
1100 (gen_i_form): New function.
1102 (GEN_BL): New macro.
1103 (gen_b_form): New function.
1104 (GEN_BNE): New macro.
1105 (GEN_LOAD): New macro.
1106 (GEN_STORE): New macro.
1107 (gen_limm): New function.
1108 (gen_atomic_xchg): New function.
1109 (gen_call): New function.
1110 (ppc_relocate_instruction): New function.
1111 (ppc_install_fast_tracepoint_jump_pad): New function.
1112 (ppc_get_min_fast_tracepoint_insn_len): New function.
1113 (ppc_get_ipa_tdesc_idx): New function.
1114 (the_low_target): Wire in the new functions.
1115 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1117 * linux-ppc-tdesc.h: New file.
1119 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1121 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1122 (alloc_jump_pad_buffer): New function.
1123 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1124 (alloc_jump_pad_buffer): New function.
1125 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1126 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1127 (alloc_jump_pad_buffer): New function.
1128 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1129 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1130 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1131 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1133 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1135 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1136 * linux-amd64-ipa.c: Likewise.
1137 * linux-i386-ipa.c: Likewise.
1138 * linux-s390-ipa.c: Likewise.
1139 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1140 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1141 set_trace_state_variable_value_ptr.
1142 (struct ipa_sym_addresses): Likewise.
1143 (symbol_list): Likewise.
1144 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1145 accessing gdb_collect directly.
1146 (gdb_collect_ptr_type): New typedef.
1147 (get_raw_reg_ptr_type): New typedef.
1148 (get_trace_state_variable_value_ptr_type): New typedef.
1149 (set_trace_state_variable_value_ptr_type): New typedef.
1150 (gdb_collect_ptr): New global.
1151 (get_raw_reg_ptr): New global.
1152 (get_trace_state_variable_value_ptr): New global.
1153 (set_trace_state_variable_value_ptr): New global.
1154 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1155 accessing get_raw_reg directly.
1156 (get_get_tsv_func_addr): Likewise for
1157 get_trace_state_variable_value_ptr.
1158 (get_set_tsv_func_addr): Likewise for
1159 set_trace_state_variable_value_ptr.
1160 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1162 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1164 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1166 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1168 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1170 (relocate_instruction): Remove own_buf.
1171 * server.c (own_buf): Make global.
1172 (handle_v_requests): Make global.
1173 * server.h (own_buf): New declaration.
1174 (handle_v_requests): New prototype.
1176 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1179 * linux-s390-low.c (add_insns): New function.
1180 (s390_emit_prologue): New function.
1181 (s390_emit_epilogue): New function.
1182 (s390_emit_add): New function.
1183 (s390_emit_sub): New function.
1184 (s390_emit_mul): New function.
1185 (s390_emit_lsh): New function.
1186 (s390_emit_rsh_signed): New function.
1187 (s390_emit_rsh_unsigned): New function.
1188 (s390_emit_ext): New function.
1189 (s390_emit_log_not): New function.
1190 (s390_emit_bit_and): New function.
1191 (s390_emit_bit_or): New function.
1192 (s390_emit_bit_xor): New function.
1193 (s390_emit_bit_not): New function.
1194 (s390_emit_equal): New function.
1195 (s390_emit_less_signed): New function.
1196 (s390_emit_less_unsigned): New function.
1197 (s390_emit_ref): New function.
1198 (s390_emit_if_goto): New function.
1199 (s390_emit_goto): New function.
1200 (s390_write_goto_address): New function.
1201 (s390_emit_litpool): New function.
1202 (s390_emit_const): New function.
1203 (s390_emit_call): New function.
1204 (s390_emit_reg): New function.
1205 (s390_emit_pop): New function.
1206 (s390_emit_stack_flush): New function.
1207 (s390_emit_zero_ext): New function.
1208 (s390_emit_swap): New function.
1209 (s390_emit_stack_adjust): New function.
1210 (s390_emit_set_r2): New function.
1211 (s390_emit_int_call_1): New function.
1212 (s390_emit_void_call_2): New function.
1213 (s390_emit_eq_goto): New function.
1214 (s390_emit_ne_goto): New function.
1215 (s390_emit_lt_goto): New function.
1216 (s390_emit_le_goto): New function.
1217 (s390_emit_gt_goto): New function.
1218 (s390_emit_ge_goto): New function.
1219 (s390x_emit_prologue): New function.
1220 (s390x_emit_epilogue): New function.
1221 (s390x_emit_add): New function.
1222 (s390x_emit_sub): New function.
1223 (s390x_emit_mul): New function.
1224 (s390x_emit_lsh): New function.
1225 (s390x_emit_rsh_signed): New function.
1226 (s390x_emit_rsh_unsigned): New function.
1227 (s390x_emit_ext): New function.
1228 (s390x_emit_log_not): New function.
1229 (s390x_emit_bit_and): New function.
1230 (s390x_emit_bit_or): New function.
1231 (s390x_emit_bit_xor): New function.
1232 (s390x_emit_bit_not): New function.
1233 (s390x_emit_equal): New function.
1234 (s390x_emit_less_signed): New function.
1235 (s390x_emit_less_unsigned): New function.
1236 (s390x_emit_ref): New function.
1237 (s390x_emit_if_goto): New function.
1238 (s390x_emit_const): New function.
1239 (s390x_emit_call): New function.
1240 (s390x_emit_reg): New function.
1241 (s390x_emit_pop): New function.
1242 (s390x_emit_stack_flush): New function.
1243 (s390x_emit_zero_ext): New function.
1244 (s390x_emit_swap): New function.
1245 (s390x_emit_stack_adjust): New function.
1246 (s390x_emit_int_call_1): New function.
1247 (s390x_emit_void_call_2): New function.
1248 (s390x_emit_eq_goto): New function.
1249 (s390x_emit_ne_goto): New function.
1250 (s390x_emit_lt_goto): New function.
1251 (s390x_emit_le_goto): New function.
1252 (s390x_emit_gt_goto): New function.
1253 (s390x_emit_ge_goto): New function.
1254 (s390_emit_ops): New function.
1255 (struct linux_target_ops): Fill in emit_ops hook.
1257 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1260 * Makefile.in: Add s390 IPA files.
1261 * configure.srv: Build IPA for s390.
1262 * linux-s390-ipa.c: New file.
1263 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1264 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1265 (tdesc_s390_linux32): Likewise.
1266 (init_registers_s390_linux32v1): Likewise.
1267 (tdesc_s390_linux32v1): Likewise.
1268 (init_registers_s390_linux32v2): Likewise.
1269 (tdesc_s390_linux32v2): Likewise.
1270 (init_registers_s390_linux64): Likewise.
1271 (tdesc_s390_linux64): Likewise.
1272 (init_registers_s390_linux64v1): Likewise.
1273 (tdesc_s390_linux64v1): Likewise.
1274 (init_registers_s390_linux64v2): Likewise.
1275 (tdesc_s390_linux64v2): Likewise.
1276 (init_registers_s390_te_linux64): Likewise.
1277 (tdesc_s390_te_linux64): Likewise.
1278 (init_registers_s390_vx_linux64): Likewise.
1279 (tdesc_s390_vx_linux64): Likewise.
1280 (init_registers_s390_tevx_linux64): Likewise.
1281 (tdesc_s390_tevx_linux64): Likewise.
1282 (init_registers_s390x_linux64): Likewise.
1283 (tdesc_s390x_linux64): Likewise.
1284 (init_registers_s390x_linux64v1): Likewise.
1285 (tdesc_s390x_linux64v1): Likewise.
1286 (init_registers_s390x_linux64v2): Likewise.
1287 (tdesc_s390x_linux64v2): Likewise.
1288 (init_registers_s390x_te_linux64): Likewise.
1289 (tdesc_s390x_te_linux64): Likewise.
1290 (init_registers_s390x_vx_linux64): Likewise.
1291 (tdesc_s390x_vx_linux64): Likewise.
1292 (init_registers_s390x_tevx_linux64): Likewise.
1293 (tdesc_s390x_tevx_linux64): Likewise.
1294 (have_hwcap_s390_vx): New static variable.
1295 (s390_arch_setup): Fill have_hwcap_s390_vx.
1296 (s390_get_thread_area): New function.
1297 (s390_ft_entry_gpr_esa): New const.
1298 (s390_ft_entry_gpr_zarch): New const.
1299 (s390_ft_entry_misc): New const.
1300 (s390_ft_entry_fr): New const.
1301 (s390_ft_entry_vr): New const.
1302 (s390_ft_main_31): New const.
1303 (s390_ft_main_64): New const.
1304 (s390_ft_exit_fr): New const.
1305 (s390_ft_exit_vr): New const.
1306 (s390_ft_exit_misc): New const.
1307 (s390_ft_exit_gpr_esa): New const.
1308 (s390_ft_exit_gpr_zarch): New const.
1309 (append_insns): New function.
1310 (s390_relocate_instruction): New function.
1311 (s390_install_fast_tracepoint_jump_pad): New function.
1312 (s390_get_min_fast_tracepoint_insn_len): New function.
1313 (s390_get_ipa_tdesc_idx): New function.
1314 (struct linux_target_ops): Wire in the above functions.
1315 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1316 * linux-s390-tdesc.h: New file.
1318 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1320 * linux-s390-low.c (s390_supports_tracepoints): New function.
1321 (struct linux_target_ops): Fill supports_tracepoints hook.
1323 2016-03-18 Yao Qi <yao.qi@linaro.org>
1325 * linux-low.c (lwp_signal_can_be_delivered): New function.
1326 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1328 2016-03-18 Yao Qi <yao.qi@linaro.org>
1330 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1331 0 if signal is enqueued. Remove 'signal' from one debugging
1332 message. Move one debugging message to some lines below.
1333 Remove code setting 'signal' to 0.
1335 2016-03-18 Yao Qi <yao.qi@linaro.org>
1337 * linux-low.c (linux_low_filter_event): Remove redundant
1338 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1340 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1342 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1343 (struct linux_target_ops): Wire in the above.
1345 2016-03-03 Yao Qi <yao.qi@linaro.org>
1347 * linux-low.c: Update comments to start_step_over.
1349 2016-03-03 Yao Qi <yao.qi@linaro.org>
1352 * linux-low.c (handle_extended_wait): Set child suspended
1353 if event_lwp->bp_reinsert isn't zero.
1355 2016-03-02 Yao Qi <yao.qi@linaro.org>
1357 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1358 enqueue_pending_signal.
1360 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1362 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1365 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1367 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1368 (s390_regmap_3264) [!__s390x__]: New global.
1369 (s390_collect_ptrace_register): Skip map entries containing -1.
1370 (s390_supply_ptrace_register): Ditto.
1371 (s390_fill_gprs_high): New function.
1372 (s390_store_gprs_high): New function.
1373 (s390_regsets): Add NT_S390_HIGH_GPRS.
1374 (s390_get_hwcap): Enable on 31-bit.
1375 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1376 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1377 Detect NT_S390_HIGH_GPRS.
1378 (s390_usrregs_info_3264): Enable on 31-bit.
1379 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1380 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1382 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1385 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1386 * configure.srv: Ditto.
1387 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1388 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1389 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1390 (init_registers_amd64_linux): Remove prototype.
1391 (tdesc_amd64_linux): Remove declaration.
1392 (get_ipa_tdesc): New function.
1393 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1394 initialize remaining tdescs.
1395 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1396 (init_registers_i386_linux): Remove prototype.
1397 (tdesc_i386_linux): Remove declaration.
1398 (get_ipa_tdesc): New function.
1399 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1400 initialize remaining tdescs.
1401 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1402 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1403 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1404 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1405 (x86_get_ipa_tdesc_idx): New function.
1406 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1407 * linux-x86-tdesc.h: New file.
1408 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1409 (target_get_ipa_tdesc_idx): New macro.
1410 * tracepoint.c (ipa_tdesc_idx): New macro.
1411 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1412 (symbol_list): Add ipa_tdesc_idx.
1413 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1414 (ipa_tdesc): Remove.
1415 (ipa_tdesc_idx): New variable.
1416 (get_context_regcache): Use get_ipa_tdesc.
1417 (gdb_collect): Ditto.
1419 * tracepoint.h (get_ipa_tdesc): New prototype.
1420 (ipa_tdesc): Remove.
1422 2016-02-24 Pedro Alves <palves@redhat.com>
1424 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1425 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1426 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1427 Factor out common code between the USE_SIGTRAP_SIGINFO and
1428 !USE_SIGTRAP_SIGINFO blocks.
1429 (linux_low_filter_event): Call save_stop_reason instead of
1430 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1432 (linux_wait_1): Update comments.
1434 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1436 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1437 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1438 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1439 ppc_insert_point, ppc_remove_point.
1441 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1443 * linux-s390-low.c (s390_supports_z_point_type): New function.
1444 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1446 2016-02-16 Yao Qi <yao.qi@linaro.org>
1448 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1449 PC. Get pc from regcache_read_pc.
1451 2016-02-12 Yao Qi <yao.qi@linaro.org>
1453 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1454 or linux_get_pc_32bit.
1455 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1457 2016-02-12 Yao Qi <yao.qi@linaro.org>
1459 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1460 arm_linux_get_next_pcs_fixup.
1462 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1464 * tracepoint.c (x_tracepoint_action_download): Change
1465 write_inferior_data_ptr to write_inferior_data_pointer.
1466 (cmd_qtstart): Likewise.
1467 (write_inferior_data_ptr): Remove.
1468 (download_agent_expr): Change write_inferior_data_ptr to
1469 write_inferior_data_pointer.
1470 (download_tracepoint_1): Likewise.
1471 (download_tracepoint): Likewise.
1472 (download_trace_state_variables): Likewise.
1474 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1475 Marcin Kościelnicki <koriakin@0x04.net>
1477 * tracepoint.c (struct tracepoint_action_ops): Remove.
1478 (struct tracepoint_action): Remove ops.
1479 (m_tracepoint_action_download, r_tracepoint_action_download)
1480 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1481 size and offset accordingly.
1482 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1483 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1484 (tracepoint_action_send, tracepoint_action_download): New functions.
1485 Helpers for trace action handlers.
1486 (add_tracepoint_action): Remove setup actions ops.
1487 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1489 2016-02-10 Yao Qi <yao.qi@linaro.org>
1491 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1493 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1495 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1497 * configure: Regenerate.
1499 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1501 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1502 void * to gdb_byte *.
1503 * linux-low.c (siginfo_fixup): Likewise.
1504 (linux_xfer_siginfo): Likewise.
1505 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1507 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1509 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1511 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1513 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1515 * linux-x86-low.c [__x86_64__]: Include
1516 "nat/amd64-linux-siginfo.h".
1517 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1518 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1519 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1520 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1521 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1522 (cpt_si_fd, si_timerid, si_overrun): Move from
1523 nat/amd64-linux-siginfo.c.
1524 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1526 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1528 * server.c (skip_to_semicolon): Remove.
1529 (process_point_options): Use strchrnul instead of
1532 2016-01-26 Yao Qi <yao.qi@linaro.org>
1534 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1535 * linux-low.c (install_software_single_step_breakpoints): Don't
1536 call regcache_read_pc.
1537 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1540 2016-01-26 Yao Qi <yao.qi@linaro.org>
1542 * linux-low.c (install_software_single_step_breakpoints): Call
1543 regcache_read_pc instead of get_pc.
1545 2016-01-26 Yao Qi <yao.qi@linaro.org>
1547 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1548 (unblock_async_io): Rename to ...
1549 (block_unblock_async_io): ... it. New function.
1550 (enable_async_io): Don't install SIGIO handler. Unblock it
1552 (disable_async_io): Don't ignore SIGIO. Block it instead.
1553 (initialize_async_io): Install SIGIO handler. Don't call
1556 2016-01-26 Yao Qi <yao.qi@linaro.org>
1558 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1559 first character is '\003', call *the_target->request_interrupt.
1561 2016-01-25 Yao Qi <yao.qi@linaro.org>
1563 * remote-utils.c (new_thread_notify): Remove.
1564 (dead_thread_notify): Likewise.
1565 * remote-utils.h (new_thread_notify): Remove declaration.
1566 (dead_thread_notify): Likewise.
1568 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1570 * gdb.trace/pending.exp: Fix expected message on continue.
1572 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1574 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1575 it works properly on big-endian machines where sizeof (CORE_ADDR)
1578 2016-01-21 Pedro Alves <palves@redhat.com>
1580 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1581 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1582 * configure: Regenerate.
1584 2016-01-21 Yao Qi <yao.qi@linaro.org>
1586 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1587 is_thumb and set it according to CPSR saved on the stack.
1588 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1589 arm_sigreturn_next_pc.
1591 2016-01-18 Yao Qi <yao.qi@linaro.org>
1593 * linux-low.c (linux_set_pc_64bit): New function.
1594 (linux_get_pc_64bit): New function.
1595 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1597 * linux-sparc-low.c (debug_threads): Remove declaration.
1598 (sparc_get_pc): Remove.
1599 (the_low_target): Use linux_get_pc_64bit instead of
1601 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1602 (the_low_target): Use linux_get_pc_64bit and
1605 2016-01-18 Yao Qi <yao.qi@linaro.org>
1607 * linux-arm-low.c (debug_threads): Remove declaration.
1608 (arm_get_pc, arm_set_pc): Remove.
1609 (the_low_target): Use linux_get_pc_32bit and
1611 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1612 (the_low_target): Use linux_get_pc_32bit and
1614 * linux-cris-low.c (debug_threads): Remove declaration.
1615 (cris_get_pc, cris_set_pc,): Remove.
1616 (the_low_target): Use linux_get_pc_32bit and
1618 * linux-crisv32-low.c (debug_threads): Remove declaration.
1619 (cris_get_pc, cris_set_pc): Remove.
1620 (the_low_target): Use linux_get_pc_32bit and
1622 * linux-low.c: Include inttypes.h.
1623 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1624 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1625 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1626 (the_low_target): Use linux_get_pc_32bit and
1628 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1629 (the_low_target): Use linux_get_pc_32bit and
1631 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1632 (the_low_target): Use linux_get_pc_32bit and
1634 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1635 (the_low_target): Use linux_get_pc_32bit and
1637 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1638 (the_low_target): Use linux_get_pc_32bit and
1641 2016-01-18 Gary Benson <gbenson@redhat.com>
1643 * configure.ac (AC_FUNC_FORK): New check.
1644 * config.in: Regenerate.
1645 * configure: Likewise.
1647 2016-01-14 Yao Qi <yao.qi@linaro.org>
1649 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1650 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1651 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1652 arm_get_next_pcs_ctor.
1654 2016-01-12 Josh Stone <jistone@redhat.com>
1655 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1657 * inferiors.h: Include "gdb_vecs.h".
1658 (struct process_info): Add syscalls_to_catch.
1659 * inferiors.c (remove_process): Free syscalls_to_catch.
1660 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1661 syscall_return stops.
1662 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1663 * server.c (handle_general_set): Handle QCatchSyscalls.
1664 (handle_query): Report support for QCatchSyscalls.
1665 * target.h (struct target_ops): Add supports_catch_syscall.
1666 (target_supports_catch_syscall): New macro.
1667 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1668 (struct lwp_info): Add syscall_state.
1669 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1670 Maintain syscall_state and syscalls_to_catch across exec.
1671 (get_syscall_trapinfo): New function, proxy to the_low_target.
1672 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1673 (linux_low_filter_event): Toggle syscall_state entry/return for
1674 syscall traps, and set it ignored for all others.
1675 (gdb_catching_syscalls_p): New function.
1676 (gdb_catch_this_syscall_p): New function.
1677 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1678 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1679 (linux_supports_catch_syscall): New function.
1680 (linux_target_ops): Install it.
1681 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1682 (the_low_target): Install it.
1684 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1686 * acinclude.m4: Include new ../warning.m4 file.
1687 * configure: Regenerated.
1688 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1690 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1692 * ax.c (is_goto_target): Mark static.
1693 * linux-low.c (register_addr): Likewise.
1694 (linux_fetch_registers, linux_store_registers): Likewise.
1695 * mem-break.c (any_persistent_commands): Fix old prototype.
1696 (add_commands_to_breakpoint): Mark static.
1697 * regcache.c (find_register_by_name): Delete unused func.
1698 * remote-utils.c (hex_or_minus_one): Mark static.
1699 * server.c (monitor_show_help): Mark static.
1700 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1701 handle_v_requests): Likewise.
1703 2016-01-12 Pedro Alves <palves@redhat.com>
1705 Remove use of the registered trademark symbol throughout.
1707 2016-01-08 Yao Qi <yao.qi@linaro.org>
1709 * remote-utils.c (getpkt): If c is '\003', call target hook
1712 2016-01-06 Yao Qi <yao.qi@linaro.org>
1714 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1715 linux-aarch32-low.c.
1716 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1717 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1719 (thumb2_breakpoint): Declare.
1720 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1721 linux-aarch32-low.h.
1722 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1723 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1724 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1726 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1728 * gdbreplay.c (gdbreplay_version): Change copyright year in
1730 * server.c (gdbserver_version): Likewise.
1732 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1734 * server.c (crc32_table): Delete.
1735 (crc32): Use libiberty's xcrc32 function.
1737 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1739 * lynx-low.c (lynx_delete_thread_callback): New function.
1740 (lynx_mourn): Properly delete our process and all of its
1741 threads. Remove call to clear_inferiors.
1743 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1745 * target.c (thread_search_callback): Add check that
1746 the thread_stopped target callback is not NULL before
1749 2015-12-21 Yao Qi <yao.qi@linaro.org>
1751 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1754 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1756 * server.c (handle_query): Call target_supports_software_single_step.
1758 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1760 * linux-low.c (single_step): New function.
1761 (linux_resume_one_lwp_throw): Call single_step.
1762 (start_step_over): Likewise.
1764 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1766 * Makefile.in (SFILES): Append arch/arm-linux.c,
1767 arch/arm-get-next-pcs.c.
1768 (arm-linux.o): New rule.
1769 (arm-get-next-pcs.o): New rule.
1770 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1772 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1773 to linux-aarch32-low.c.
1774 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1775 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1776 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1777 (thumb2_breakpoint_len): Likewise.
1778 (arm_is_thumb_mode): Make non-static.
1779 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1780 from linux-aarch32-low.c.
1781 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1782 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1783 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1784 (thumb2_breakpoint_len): Likewise.
1785 (arm_is_thumb_mode): New declaration.
1786 * linux-arm-low.c: Include arch/arm-linux.h
1787 aarch/arm-get-next-pcs.h, sys/syscall.h.
1788 (get_next_pcs_ops): New struct.
1789 (get_next_pcs_addr_bits_remove): New function.
1790 (get_next_pcs_is_thumb): New function.
1791 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1792 (arm_sigreturn_next_pc): Likewise.
1793 (get_next_pcs_syscall_next_pc): Likewise.
1794 (arm_gdbserver_get_next_pcs): Likewise.
1795 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1797 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1798 * server.h: Include gdb_vecs.h.
1800 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1802 * Makefile.in (SFILES): Append common/common-regcache.c.
1803 (OBS): Append common-regcache.o.
1804 (common-regcache.o): New rule.
1805 * regcache.c (init_register_cache): Initialize cache to
1807 (regcache_raw_read_unsigned): New function.
1808 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1809 register_status enum.
1811 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1813 * linux-aarch64-low.c (the_low_targets): Rename
1814 breakpoint_reinsert_addr to get_next_pcs.
1815 * linux-arm-low.c (the_low_targets): Likewise.
1816 * linux-bfin-low.c (the_low_targets): Likewise.
1817 * linux-cris-low.c (the_low_targets): Likewise.
1818 * linux-crisv32-low.c (the_low_targets): Likewise.
1819 * linux-low.c (can_software_single_step): Likewise.
1820 (install_software_single_step_breakpoints): New function.
1821 (start_step_over): Use install_software_single_step_breakpoints.
1822 * linux-low.h: New CORE_ADDR vector.
1823 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1825 * linux-mips-low.c (the_low_targets): Likewise.
1826 * linux-nios2-low.c (the_low_targets): Likewise.
1827 * linux-sparc-low.c (the_low_targets): Likewise.
1829 2015-12-17 Pedro Alves <palves@redhat.com>
1831 * linux-low.c (linux_kill_one_lwp): Remove references to
1833 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1835 (linux_init_signals): Delete.
1836 (initialize_low): Adjust.
1837 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1839 2015-12-16 Pedro Alves <palves@redhat.com>
1841 * configure.ac (compiler warning flags): When testing a
1842 -Wno-foo option, check whether -Wfoo works instead.
1843 * configure: Regenerate.
1845 2015-12-11 Don Breazeal <donb@codesourcery.com>
1847 * server.c (process_serial_event): Don't exit from gdbserver
1848 in remote mode if there are still active inferiors.
1850 2015-12-11 Yao Qi <yao.qi@linaro.org>
1852 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1853 arm_breakpoint_at if the process is 32-bit.
1855 2015-12-11 Yao Qi <yao.qi@linaro.org>
1857 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1860 2015-12-07 Yao Qi <yao.qi@linaro.org>
1862 * configure.srv: Append arm.o to srv_tgtobj for
1863 aarch64*-*-linux* target.
1864 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1865 from linux-arm-low.c.
1866 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1867 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1868 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1869 (thumb2_breakpoint_len): Likewise.
1870 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1871 (arm_breakpoint_kinds): Likewise.
1872 (arm_breakpoint_kind_from_pc): Likewise.
1873 (arm_sw_breakpoint_from_kind): Likewise.
1874 (arm_breakpoint_kind_from_current_state): Likewise.
1875 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1876 (arm_sw_breakpoint_from_kind): Declare.
1877 (arm_breakpoint_kind_from_current_state): Declare.
1878 (arm_breakpoint_at): Declare.
1879 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1880 arm_sw_breakpoint_from_kind if process is 32-bit.
1881 (aarch64_breakpoint_kind_from_pc): New function.
1882 (aarch64_breakpoint_kind_from_current_state): New function.
1883 (the_low_target): Initialize fields breakpoint_kind_from_pc
1884 and breakpoint_kind_from_current_state.
1885 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1886 linux-aarch32-low.c.
1887 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1888 (arm_breakpoint, arm_breakpoint_len): Likewise.
1889 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1890 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1891 (arm_is_thumb_mode): Likewise.
1892 (arm_breakpoint_at): Likewise.
1893 (arm_breakpoint_kind_from_pc): Likewise.
1894 (arm_sw_breakpoint_from_kind): Likewise.
1895 (arm_breakpoint_kind_from_current_state): Likewise.
1898 2015-08-04 Yao Qi <yao.qi@linaro.org>
1900 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1901 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1902 * server.c (extended_protocol): Remove "static".
1903 * server.h (extended_protocol): Declare it.
1905 2015-12-04 Josh Stone <jistone@redhat.com>
1907 * target.h (struct target_ops) <arch_setup>: Rename to ...
1908 (struct target_ops) <post_create_inferior>: ... this.
1909 (target_arch_setup): Rename to ...
1910 (target_post_create_inferior): ... this, calling post_create_inferior.
1911 * server.c (start_inferior): Update target_arch_setup calls to
1912 target_post_create_inferior.
1913 * linux-low.c (linux_low_ptrace_options): Forward declare.
1914 (linux_arch_setup): Update its comment for general use.
1915 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1916 (struct linux_target_ops): Use linux_post_create_inferior.
1917 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1918 to post_create_inferior.
1919 * nto-low.c (struct nto_target_ops): Likewise.
1920 * spu-low.c (struct spu_target_ops): Likewise.
1921 * win32-low.c (struct win32_target_ops): Likewise.
1923 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1925 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1927 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1929 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1930 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1931 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1932 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1933 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1934 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1935 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1936 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1937 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1938 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1939 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1940 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1942 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1944 * linux-low.c (linux_look_up_symbols): Don't call
1945 linux_supports_traceclone.
1946 * linux-low.h (thread_db_init): Remove use_events argument.
1947 * thread-db.c (thread_db_use_event): Remove global variable.
1948 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1949 (struct thread_db) <td_create_bp>: Remove field.
1950 (thread_db_create_event): Remove function.
1951 (thread_db_enable_reporting): Likewise.
1952 (find_one_thread): Don't check for thread_db_use_events.
1953 (attach_thread): Likewise.
1954 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1955 (try_thread_db_load_1): Don't check for thread_db_use_events.
1956 (thread_db_init): Remove use_events argument and thread events
1958 (remove_thread_event_breakpoints): Remove function.
1959 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1961 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1963 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1966 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1967 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1968 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1969 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1971 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1974 * linux-low.c (can_hardware_single_step): Use
1975 supports_hardware_single_step.
1976 (can_software_single_step): New function.
1977 (start_step_over): Call can_software_single_step.
1978 (linux_supports_hardware_single_step): New function.
1979 (struct target_ops) <supports_software_single_step>: Initialize.
1980 * linux-low.h (struct linux_target_ops)
1981 <supports_hardware_single_step>: Initialize.
1982 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1983 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1984 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1985 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1986 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1987 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1988 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1989 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1990 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1991 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1993 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1994 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1996 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1998 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2000 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2001 * target.h (struct target_ops): <supports_software_single_step>:
2003 (target_supports_software_single_step): New macro.
2005 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2007 * linux-low.c (linux_wait_1): Fix pc advance condition.
2008 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2009 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2011 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2013 * linux-arm-low.c (arm_is_thumb_mode): New function.
2014 (arm_breakpoint_at): Use arm_is_thumb_mode.
2015 (arm_breakpoint_kind_from_current_state): New function.
2016 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2018 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2019 (linux_breakpoint_kind_from_current_state): New function.
2020 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2021 * linux-low.h (struct linux_target_ops)
2022 <breakpoint_kind_from_current_state>: New field.
2023 * target.h (struct target_ops): Likewise.
2024 (target_breakpoint_kind_from_current_state): New macro.
2026 2015-11-30 Pedro Alves <palves@redhat.com>
2028 * linux-low.c (linux_resume): Wake up the event loop before
2031 2015-11-30 Pedro Alves <palves@redhat.com>
2033 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2035 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2037 * target.c (struct thread_search): New structure.
2038 (thread_search_callback): New function.
2039 (prev_general_thread): New global.
2040 (prepare_to_access_memory, done_accessing_memory): New functions.
2041 * target.h (prepare_to_access_memory, done_accessing_memory):
2042 Replace macros with function declarations.
2044 2015-11-30 Pedro Alves <palves@redhat.com>
2047 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2048 report TARGET_WAITKIND_NO_RESUMED.
2049 * remote-utils.c (prepare_resume_reply): Handle
2050 TARGET_WAITKIND_NO_RESUMED.
2051 * server.c (report_no_resumed): New global.
2052 (handle_query) <qSupported>: Handle "no-resumed+". Report
2053 "no-resumed+" support.
2054 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2055 return error if the client doesn't support no-resumed events.
2056 (push_stop_notification): New function.
2057 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2058 events if the client supports them.
2060 2015-11-30 Pedro Alves <palves@redhat.com>
2062 * linux-low.c (thread_still_has_status_pending_p): Don't check
2064 (lwp_resumed): New function.
2065 (status_pending_p_callback): Return early if the LWP is not
2066 supposed to be resumed.
2068 2015-11-30 Pedro Alves <palves@redhat.com>
2070 * linux-low.c (handle_extended_wait): Assert that the LWP's
2071 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2072 thread create events, leave the new child's status pending.
2073 (linux_low_filter_event): If GDB wants to hear about thread exit
2074 events, leave the LWP marked dead and don't delete it.
2075 (linux_wait_for_event_filtered): Don't check for thread exit.
2076 (filter_exit_event): New function.
2077 (linux_wait_1): Use it, when returning an exit event.
2078 (linux_resume_one_lwp_throw): Assert that the LWP's
2079 waitstatus is TARGET_WAITKIND_IGNORE.
2080 * remote-utils.c (prepare_resume_reply): Handle
2081 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2082 * server.c (report_thread_events): New global.
2083 (handle_general_set): Handle QThreadEvents.
2084 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2085 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2086 TARGET_WAITKIND_THREAD_EXITED.
2087 * server.h (report_thread_events): Declare.
2089 2015-11-30 Pedro Alves <palves@redhat.com>
2091 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2092 the thread's last_resume_kind was resume_stop.
2094 2015-11-30 Pedro Alves <palves@redhat.com>
2096 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2099 2015-11-30 Pedro Alves <palves@redhat.com>
2101 * server.c (handle_v_requests): Handle vCtrlC.
2103 2015-11-30 Pedro Alves <palves@redhat.com>
2105 * gdbthread.h (find_any_thread_of_pid): Declare.
2106 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2108 * server.c (handle_query): If current_thread is NULL, look for
2109 another thread of the selected process.
2111 2015-11-26 Daniel Colascione <dancol@dancol.org>
2112 Simon Marchi <simon.marchi@ericsson.com>
2114 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2115 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2117 * target.h (struct target_ops) <thread_name>: New field.
2118 (target_thread_name): New macro.
2120 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2122 * regcache.h (regcache_invalidate_pid): Add declaration.
2123 * regcache.c (regcache_invalidate_pid): New function, extracted
2124 from regcache_invalidate.
2125 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2126 Add trivial documentation comment.
2127 * lynx-low.c: Use regcache_invalidate_pid instead of
2128 regcache_invalidate.
2130 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2132 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2133 and Elf64_auxv_t if the target is Android.
2135 2015-11-22 Doug Evans <xdje42@gmail.com>
2137 * target.h: #include <sys/types.h>.
2139 2015-11-19 Pedro Alves <palves@redhat.com>
2141 * linux-low.c (linux_process_qsupported): Change prototype.
2143 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2145 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2146 and adjust to loop over all features.
2147 * server.c (handle_query) <qSupported>: Adjust to call
2148 target_process_qsupported once, passing it a vector of unprocessed
2150 * target.h (struct target_ops) <process_qsupported>: Change
2152 (target_process_qsupported): Adjust.
2154 2015-11-19 Pedro Alves <palves@redhat.com>
2156 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2158 * configure: Regenerate.
2160 2015-11-19 Pedro Alves <palves@redhat.com>
2162 * configure: Regenerate.
2164 2015-11-19 Yao Qi <yao.qi@linaro.org>
2166 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2169 2015-11-19 Yao Qi <yao.qi@linaro.org>
2171 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2172 (struct aarch64_operand): Move enum out.
2174 2015-11-19 Yao Qi <yao.qi@linaro.org>
2176 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2177 struct user_fpsimd_state *.
2178 (aarch64_store_fpregset): Likewise.
2180 2015-11-19 Yao Qi <yao.qi@linaro.org>
2182 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2183 struct user_pt_regs *.
2184 (aarch64_store_gregset): Likewise.
2186 2015-11-18 Pedro Alves <palves@redhat.com>
2188 * Makefile.in (all_object_files): Add $IPA_OBJS.
2190 2015-11-17 Pedro Alves <palves@redhat.com>
2192 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2193 GDB_SIGNAL_0 and gdb_signal_to_string.
2195 2015-11-17 Pedro Alves <palves@redhat.com>
2197 * win32-low.c (handle_output_debug_string): Remove parameter.
2198 (win32_kill): Remove our_status local and adjust call to
2199 handle_output_debug_string.
2200 (get_child_debug_event): Adjust call to
2201 handle_output_debug_string.
2203 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2205 * linux-mips-low.c (mips_fill_gregset): Add cast.
2206 (mips_store_gregset): Likewise.
2207 (mips_fill_fpregset): Likewise.
2208 (mips_store_fpregset): Likewise.
2210 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2212 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2215 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2217 * linux-mips-low.c (mips_linux_new_thread): Change type of
2218 watch_type to enum target_hw_bp_type.
2220 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2222 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2223 Change return type to arm_hwbp_type.
2225 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2227 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2228 (arm_store_gregset): Likewise.
2229 * linux-arm-low.c (arm_get_hwcap): Likewise.
2230 (arm_read_description): Likewise.
2232 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2234 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2236 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2238 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2239 (ppc_fill_vsxregset): Likewise.
2240 (ppc_store_vsxregset): Likewise.
2241 (ppc_fill_vrregset): Likewise.
2242 (ppc_store_vrregset): Likewise.
2243 (ppc_fill_evrregset): Likewise.
2244 (ppc_store_evrregset): Likewise.
2246 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2248 * linux-ppc-low.c (ppc_usrregs_info): Remove
2249 forward-declaration.
2250 (ppc_arch_setup): Move lower in file.
2252 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2254 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2255 (ps_pdwrite): Likewise.
2257 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2259 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2260 to after assert checks.
2262 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2264 * proc-service.c (ps_pdread): Add/adjust casts.
2265 (ps_pdwrite): Add/adjust casts.
2267 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2269 * server.c (handle_search_memory_1): Cast return value of
2272 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2274 * server.c (write_qxfer_response): Change type of data to
2277 2015-10-29 Pedro Alves <palves@redhat.com>
2279 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2281 2015-10-29 Pedro Alves <palves@redhat.com>
2283 * tracepoint.c (clear_installed_tracepoints): Add casts.
2285 2015-10-29 Pedro Alves <palves@redhat.com>
2287 * server.c (handle_v_cont, process_serial_event): Add enum
2288 gdb_signal casts to signal parsing code.
2290 2015-10-29 Pedro Alves <palves@redhat.com>
2292 * linux-low.h (NULL_REGSET): Define.
2293 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2294 * linux-arm-low.c (arm_regsets): Likewise.
2295 * linux-crisv32-low.c (cris_regsets): Likewise.
2296 * linux-m68k-low.c (m68k_regsets): Likewise.
2297 * linux-mips-low.c (mips_regsets): Likewise.
2298 * linux-nios2-low.c (nios2_regsets): Likewise.
2299 * linux-ppc-low.c (ppc_regsets): Likewise.
2300 * linux-s390-low.c (s390_regsets): Likewise.
2301 * linux-sh-low.c (sh_regsets): Likewise.
2302 * linux-sparc-low.c (sparc_regsets): Likewise.
2303 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2304 * linux-tile-low.c (tile_regsets): Likewise.
2305 * linux-x86-low.c (x86_regsets): Likewise.
2306 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2308 2015-10-29 Pedro Alves <palves@redhat.com>
2310 * linux-low.h (NULL_REGSET): Define.
2311 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2312 * linux-arm-low.c (arm_regsets): Likewise.
2313 * linux-crisv32-low.c (cris_regsets): Likewise.
2314 * linux-m68k-low.c (m68k_regsets): Likewise.
2315 * linux-mips-low.c (mips_regsets): Likewise.
2316 * linux-nios2-low.c (nios2_regsets): Likewise.
2317 * linux-ppc-low.c (ppc_regsets): Likewise.
2318 * linux-s390-low.c (s390_regsets): Likewise.
2319 * linux-sh-low.c (sh_regsets): Likewise.
2320 * linux-sparc-low.c (sparc_regsets): Likewise.
2321 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2322 * linux-tile-low.c (tile_regsets): Likewise.
2323 * linux-x86-low.c (x86_regsets): Likewise.
2324 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2326 2015-10-26 Doug Evans <dje@google.com>
2328 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2330 2015-10-26 Doug Evans <dje@google.com>
2332 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2334 2015-10-26 Doug Evans <dje@google.com>
2336 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2338 (attach_thread, find_new_threads_callback): Ditto.
2340 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2342 * mem-break.h (set_breakpoint_data): Remove.
2344 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2346 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2347 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2348 (initialize_low): Remove set_breakpoint_data call.
2349 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2350 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2351 (initialize_low): Remove set_breakpoint_data call.
2352 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2353 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2354 (initialize_low): Remove set_breakpoint_data call.
2356 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2358 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2359 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2360 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2361 * target.h (target_breakpoint_kind_from_pc): New macro.
2363 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2365 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2366 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2367 the default breakpoint kind.
2369 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371 * linux-arm-low.c (arm_supports_z_point_type): Add software
2374 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2376 * linux-arm-low.c: Refactor breakpoint definitions.
2377 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2378 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2380 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2382 * Makefile.in: Add arm.c/o.
2383 * configure.srv: Likewise.
2384 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2385 (arm_breakpoint_kind_from_pc): New function.
2386 (arm_sw_breakpoint_from_kind): Return proper kind.
2387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2389 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2391 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2393 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2394 (struct raw_breakpoint) <size>: Remove.
2395 (struct raw_breakpoint) <kind>: Add.
2396 (bp_size): New function.
2397 (bp_opcode): Likewise.
2398 (find_raw_breakpoint_at): Adjust for kind.
2399 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2400 (remove_memory_breakpoint): Adjust for kind call bp_size.
2401 (set_raw_breakpoint_at): Adjust for kind.
2402 (set_breakpoint): Likewise.
2403 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2404 (delete_raw_breakpoint): Adjust for kind.
2405 (delete_breakpoint): Likewise.
2406 (find_gdb_breakpoint): Likewise.
2407 (set_gdb_breakpoint_1): Likewise.
2408 (set_gdb_breakpoint): Likewise.
2409 (delete_gdb_breakpoint_1): Likewise.
2410 (delete_gdb_breakpoint): Likewise.
2411 (uninsert_raw_breakpoint): Likewise.
2412 (reinsert_raw_breakpoint): Likewise.
2413 (set_breakpoint_data): Remove.
2414 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2415 (check_mem_read): Adjust for kind call bp_size.
2416 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2417 (clone_one_breakpoint): Adjust for kind.
2418 * mem-break.h (set_gdb_breakpoint): Likewise.
2419 (delete_gdb_breakpoint): Likewise.
2420 * server.c (process_serial_event): Likewise.
2422 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2424 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2425 (struct linux_target_ops) <breakpoint>: Remove.
2426 (struct linux_target_ops) <breakpoint_len>: Remove.
2427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2429 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2430 (arm_sw_breakpoint_from_kind): New function.
2431 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2432 (struct linux_target_ops) <breakpoint>: Remove.
2433 (struct linux_target_ops) <breakpoint_len>: Remove.
2434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2436 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2437 (struct linux_target_ops) <breakpoint>: Remove.
2438 (struct linux_target_ops) <breakpoint_len>: Remove.
2439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2441 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2442 (struct linux_target_ops) <breakpoint>: Remove.
2443 (struct linux_target_ops) <breakpoint_len>: Remove.
2444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2446 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2447 and sw_breakpoint_from_kind to increment the pc.
2448 (linux_breakpoint_kind_from_pc): New function.
2449 (linux_sw_breakpoint_from_kind): New function.
2450 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2451 (initialize_low): Call breakpoint_kind_from_pc and
2452 sw_breakpoint_from_kind to replace breakpoint_data/len.
2453 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2456 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2457 (struct linux_target_ops) <breakpoint>: Remove.
2458 (struct linux_target_ops) <breakpoint_len>: Remove.
2459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2461 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2462 (struct linux_target_ops) <breakpoint>: Remove.
2463 (struct linux_target_ops) <breakpoint_len>: Remove.
2464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2466 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2467 (struct linux_target_ops) <breakpoint>: Remove.
2468 (struct linux_target_ops) <breakpoint_len>: Remove.
2469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2472 (struct linux_target_ops) <breakpoint>: Remove.
2473 (struct linux_target_ops) <breakpoint_len>: Remove.
2474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2476 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2477 (struct linux_target_ops) <breakpoint>: Remove.
2478 (struct linux_target_ops) <breakpoint_len>: Remove.
2479 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2481 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2482 (struct linux_target_ops) <breakpoint>: Remove.
2483 (struct linux_target_ops) <breakpoint_len>: Remove.
2484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2486 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2487 (struct linux_target_ops) <breakpoint>: Remove.
2488 (struct linux_target_ops) <breakpoint_len>: Remove.
2489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2491 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2492 (struct linux_target_ops) <breakpoint>: Remove.
2493 (struct linux_target_ops) <breakpoint_len>: Remove.
2494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2496 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2497 (struct linux_target_ops) <breakpoint>: Remove.
2498 (struct linux_target_ops) <breakpoint_len>: Remove.
2499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2501 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2502 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2503 (struct linux_target_ops) <breakpoint>: Remove.
2504 (struct linux_target_ops) <breakpoint_len>: Remove.
2505 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2506 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2507 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2508 (struct linux_target_ops) <breakpoint>: Remove.
2509 (struct linux_target_ops) <breakpoint_len>: Remove.
2510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2513 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2515 * linux-cris-low.c (cris_get_pc): Remove void arg.
2517 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2519 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2522 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2524 * inferiors.c (thread_pid_matches_callback): New function.
2525 (find_thread_process): New function.
2526 (remove_thread): Reset current_thread.
2527 (remove_process): Assert threads have been removed first.
2529 2015-10-15 Yao Qi <yao.qi@linaro.org>
2531 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2533 (aarch64_remove_point): Likewise.
2534 * regcache.c (regcache_register_size): New function.
2536 2015-10-12 Yao Qi <yao.qi@linaro.org>
2538 * linux-aarch64-low.c: Update all callers as emit_load_store
2539 is renamed to aarch64_emit_load_store.
2541 2015-10-12 Yao Qi <yao.qi@linaro.org>
2543 * linux-aarch64-low.c: Update all callers of function renaming
2544 from emit_insn to aarch64_emit_insn.
2546 2015-10-12 Yao Qi <yao.qi@linaro.org>
2548 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2549 arch/aarch64-insn.h.
2550 (struct aarch64_memory_operand): Likewise.
2552 (emit_insn): Move to arch/aarch64-insn.c.
2553 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2554 (emit_load_store): Move to arch/aarch64-insn.c.
2555 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2556 (can_encode_int32): Remove.
2558 2015-10-12 Yao Qi <yao.qi@linaro.org>
2560 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2561 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2562 (aarch64_relocate_instruction): Likewise.
2563 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2564 (struct aarch64_insn_visitor): Likewise.
2566 2015-10-12 Yao Qi <yao.qi@linaro.org>
2568 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2569 (struct aarch64_insn_visitor): New.
2570 (struct aarch64_insn_relocation_data): New.
2571 (aarch64_ftrace_insn_reloc_b): New function.
2572 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2573 (aarch64_ftrace_insn_reloc_cb): Likewise.
2574 (aarch64_ftrace_insn_reloc_tb): Likewise.
2575 (aarch64_ftrace_insn_reloc_adr): Likewise.
2576 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2577 (aarch64_ftrace_insn_reloc_others): Likewise.
2579 (aarch64_relocate_instruction): Use visitor.
2581 2015-10-12 Yao Qi <yao.qi@linaro.org>
2583 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2584 int. Add argument buf.
2585 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2586 aarch64_relocate_instruction.
2588 2015-10-12 Yao Qi <yao.qi@linaro.org>
2590 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2591 argument insn. Remove local variable insn. Don't call
2593 (aarch64_install_fast_tracepoint_jump_pad): Call
2596 2015-09-30 Yao Qi <yao.qi@linaro.org>
2598 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2599 (emit_load_store_pair): Likewise.
2601 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2603 * dll.c (match_dll): Add cast(s).
2604 (unloaded_dll): Likewise.
2605 * linux-low.c (second_thread_of_pid_p): Likewise.
2606 (delete_lwp_callback): Likewise.
2607 (count_events_callback): Likewise.
2608 (select_event_lwp_callback): Likewise.
2609 (linux_set_resume_request): Likewise.
2610 * server.c (accumulate_file_name_length): Likewise.
2611 (emit_dll_description): Likewise.
2612 (handle_qxfer_threads_worker): Likewise.
2613 (visit_actioned_threads): Likewise.
2614 * thread-db.c (any_thread_of): Likewise.
2615 * tracepoint.c (same_process_p): Likewise.
2616 (match_blocktype): Likewise.
2617 (build_traceframe_info_xml): Likewise.
2619 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2621 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2623 (gdb_unparse_agent_expr): Likewise.
2624 * hostio.c (require_data): Likewise.
2625 (handle_pread): Likewise.
2626 * linux-low.c (disable_regset): Likewise.
2627 (fetch_register): Likewise.
2628 (store_register): Likewise.
2629 (get_dynamic): Likewise.
2630 (linux_qxfer_libraries_svr4): Likewise.
2631 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2632 (set_fast_tracepoint_jump): Likewise.
2633 (uninsert_fast_tracepoint_jumps_at): Likewise.
2634 (reinsert_fast_tracepoint_jumps_at): Likewise.
2635 (validate_inserted_breakpoint): Likewise.
2636 (clone_agent_expr): Likewise.
2637 * regcache.c (init_register_cache): Likewise.
2638 * remote-utils.c (putpkt_binary_1): Likewise.
2639 (decode_M_packet): Likewise.
2640 (decode_X_packet): Likewise.
2641 (look_up_one_symbol): Likewise.
2642 (relocate_instruction): Likewise.
2643 (monitor_output): Likewise.
2644 * server.c (handle_search_memory): Likewise.
2645 (handle_qxfer_exec_file): Likewise.
2646 (handle_qxfer_libraries): Likewise.
2647 (handle_qxfer): Likewise.
2648 (handle_query): Likewise.
2649 (handle_v_cont): Likewise.
2650 (handle_v_run): Likewise.
2651 (captured_main): Likewise.
2652 * target.c (write_inferior_memory): Likewise.
2653 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2654 * tracepoint.c (init_trace_buffer): Likewise.
2655 (add_tracepoint_action): Likewise.
2656 (add_traceframe): Likewise.
2657 (add_traceframe_block): Likewise.
2658 (cmd_qtdpsrc): Likewise.
2659 (cmd_qtdv): Likewise.
2660 (cmd_qtstatus): Likewise.
2661 (response_source): Likewise.
2662 (response_tsv): Likewise.
2663 (cmd_qtnotes): Likewise.
2664 (gdb_collect): Likewise.
2665 (initialize_tracepoint): Likewise.
2667 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2669 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2670 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2671 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2673 (enum aarch64_condition_codes): New enum.
2674 (w0): New static global.
2677 (struct aarch64_memory_operand) <type>: New
2678 MEMORY_OPERAND_POSTINDEX type.
2679 (postindex_memory_operand): New helper function.
2680 (emit_ret): New function.
2681 (emit_load_store_pair): New function, factored out of emit_stp
2682 with support for MEMORY_OPERAND_POSTINDEX.
2683 (emit_stp): Rewrite using emit_load_store_pair.
2684 (emit_ldp): New function.
2685 (emit_load_store): Likewise.
2686 (emit_ldr): Mention post-index instruction in comment.
2687 (emit_ldrh): New function.
2688 (emit_ldrb): New function.
2689 (emit_ldrsw): Mention post-index instruction in comment.
2690 (emit_str): Likewise.
2691 (emit_subs): New function.
2692 (emit_cmp): Likewise.
2693 (emit_and): Likewise.
2694 (emit_orr): Likewise.
2695 (emit_orn): Likewise.
2696 (emit_eor): Likewise.
2697 (emit_mvn): Likewise.
2698 (emit_lslv): Likewise.
2699 (emit_lsrv): Likewise.
2700 (emit_asrv): Likewise.
2701 (emit_mul): Likewise.
2702 (emit_sbfm): Likewise.
2703 (emit_sbfx): Likewise.
2704 (emit_ubfm): Likewise.
2705 (emit_ubfx): Likewise.
2706 (emit_csinc): Likewise.
2707 (emit_cset): Likewise.
2708 (emit_nop): Likewise.
2709 (emit_ops_insns): New helper function.
2710 (emit_pop): Likewise.
2711 (emit_push): Likewise.
2712 (aarch64_emit_prologue): New function.
2713 (aarch64_emit_epilogue): Likewise.
2714 (aarch64_emit_add): Likewise.
2715 (aarch64_emit_sub): Likewise.
2716 (aarch64_emit_mul): Likewise.
2717 (aarch64_emit_lsh): Likewise.
2718 (aarch64_emit_rsh_signed): Likewise.
2719 (aarch64_emit_rsh_unsigned): Likewise.
2720 (aarch64_emit_ext): Likewise.
2721 (aarch64_emit_log_not): Likewise.
2722 (aarch64_emit_bit_and): Likewise.
2723 (aarch64_emit_bit_or): Likewise.
2724 (aarch64_emit_bit_xor): Likewise.
2725 (aarch64_emit_bit_not): Likewise.
2726 (aarch64_emit_equal): Likewise.
2727 (aarch64_emit_less_signed): Likewise.
2728 (aarch64_emit_less_unsigned): Likewise.
2729 (aarch64_emit_ref): Likewise.
2730 (aarch64_emit_if_goto): Likewise.
2731 (aarch64_emit_goto): Likewise.
2732 (aarch64_write_goto_address): Likewise.
2733 (aarch64_emit_const): Likewise.
2734 (aarch64_emit_call): Likewise.
2735 (aarch64_emit_reg): Likewise.
2736 (aarch64_emit_pop): Likewise.
2737 (aarch64_emit_stack_flush): Likewise.
2738 (aarch64_emit_zero_ext): Likewise.
2739 (aarch64_emit_swap): Likewise.
2740 (aarch64_emit_stack_adjust): Likewise.
2741 (aarch64_emit_int_call_1): Likewise.
2742 (aarch64_emit_void_call_2): Likewise.
2743 (aarch64_emit_eq_goto): Likewise.
2744 (aarch64_emit_ne_goto): Likewise.
2745 (aarch64_emit_lt_goto): Likewise.
2746 (aarch64_emit_le_goto): Likewise.
2747 (aarch64_emit_gt_goto): Likewise.
2748 (aarch64_emit_ge_got): Likewise.
2749 (aarch64_emit_ops_impl): New static global variable.
2750 (aarch64_emit_ops): New target function, return
2751 &aarch64_emit_ops_impl.
2752 (struct linux_target_ops): Install it.
2754 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2756 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2757 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2759 * linux-aarch64-ipa.c: New file.
2760 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2762 (aarch64_get_thread_area): New target method.
2763 (extract_signed_bitfield): New helper function.
2764 (aarch64_decode_ldr_literal): New function.
2765 (enum aarch64_opcodes): New enum.
2766 (struct aarch64_register): New struct.
2767 (struct aarch64_operand): New struct.
2768 (x0): New static global.
2777 (aarch64_register): New helper function.
2778 (register_operand): Likewise.
2779 (immediate_operand): Likewise.
2780 (struct aarch64_memory_operand): New struct.
2781 (offset_memory_operand): New helper function.
2782 (preindex_memory_operand): Likewise.
2783 (enum aarch64_system_control_registers): New enum.
2784 (ENCODE): New macro.
2785 (emit_insn): New helper function.
2786 (emit_b): New function.
2787 (emit_bcond): Likewise.
2788 (emit_cb): Likewise.
2789 (emit_tb): Likewise.
2790 (emit_blr): Likewise.
2791 (emit_stp): Likewise.
2792 (emit_ldp_q_offset): Likewise.
2793 (emit_stp_q_offset): Likewise.
2794 (emit_load_store): Likewise.
2795 (emit_ldr): Likewise.
2796 (emit_ldrsw): Likewise.
2797 (emit_str): Likewise.
2798 (emit_ldaxr): Likewise.
2799 (emit_stxr): Likewise.
2800 (emit_stlr): Likewise.
2801 (emit_data_processing_reg): Likewise.
2802 (emit_data_processing): Likewise.
2803 (emit_add): Likewise.
2804 (emit_sub): Likewise.
2805 (emit_mov): Likewise.
2806 (emit_movk): Likewise.
2807 (emit_mov_addr): Likewise.
2808 (emit_mrs): Likewise.
2809 (emit_msr): Likewise.
2810 (emit_sevl): Likewise.
2811 (emit_wfe): Likewise.
2812 (append_insns): Likewise.
2813 (can_encode_int32_in): New helper function.
2814 (aarch64_relocate_instruction): New function.
2815 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2816 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2817 (struct linux_target_ops): Install aarch64_get_thread_area,
2818 aarch64_install_fast_tracepoint_jump_pad and
2819 aarch64_get_min_fast_tracepoint_insn_len.
2821 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2823 * Makefile.in (aarch64-insn.o): New rule.
2824 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2826 2015-09-21 Yao Qi <yao.qi@linaro.org>
2828 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2830 2015-09-21 Yao Qi <yao.qi@linaro.org>
2832 * tracepoint.c (max_jump_pad_size): Remove.
2834 2015-09-18 Yao Qi <yao.qi@linaro.org>
2836 * linux-aarch64-low.c: Don't include sys/uio.h.
2837 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2839 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2841 * tracepoint.c (eval_result_type): Change prototype.
2842 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2844 2015-09-15 Pedro Alves <palves@redhat.com>
2846 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2847 Check whether to report exec events instead of checking whether
2848 multiprocess is enabled.
2850 2015-09-15 Pedro Alves <palves@redhat.com>
2853 * remote-utils.c (prepare_resume_reply): Merge
2854 TARGET_WAITKIND_VFORK_DONE switch case with the
2855 TARGET_WAITKIND_FORKED case.
2857 2015-09-15 Yao Qi <yao.qi@linaro.org>
2859 * server.c (handle_query): Check string comparison using
2860 "else if" instead of "if".
2862 2015-09-15 Yao Qi <yao.qi@linaro.org>
2864 * server.c (vCont_supported): New global variable.
2865 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2866 matches. Append ";vContSupported+" to own_buf.
2867 (handle_v_requests): Append ";s;S" to own_buf if target supports
2868 hardware single step or vCont_supported is false.
2869 (capture_main): Set vCont_supported to zero.
2871 2015-09-15 Yao Qi <yao.qi@linaro.org>
2873 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2875 (linux_supports_hardware_single_step): ... New function.
2876 (linux_target_ops): Update.
2877 * lynx-low.c (lynx_target_ops): Set field
2878 supports_hardware_single_step to target_can_do_hardware_single_step.
2879 * nto-low.c (nto_target_ops): Likewise.
2880 * spu-low.c (spu_target_ops): Likewise.
2881 * win32-low.c (win32_target_ops): Likewise.
2882 * target.c (target_can_do_hardware_single_step): New function.
2883 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2884 Remove. <supports_hardware_single_step>: New field.
2885 (target_supports_conditional_breakpoints): Remove.
2886 (target_supports_hardware_single_step): New macro.
2887 (target_can_do_hardware_single_step): Declare.
2888 * server.c (handle_query): Use target_supports_hardware_single_step
2889 instead of target_supports_conditional_breakpoints.
2891 2015-09-15 Yao Qi <yao.qi@linaro.org>
2893 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2895 (struct linux_target_ops the_low_target): Install
2896 aarch64_linux_siginfo_fixup.
2898 2015-09-11 Don Breazeal <donb@codesourcery.com>
2899 Luis Machado <lgustavo@codesourcery.com>
2901 * linux-low.c (linux_mourn): Static declaration.
2902 (linux_arch_setup): Move in front of
2903 handle_extended_wait.
2904 (linux_arch_setup_thread): New function.
2905 (handle_extended_wait): Handle exec events. Call
2906 linux_arch_setup_thread. Make event_lwp argument a
2907 pointer-to-a-pointer.
2908 (check_zombie_leaders): Do not check stopped threads.
2909 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2910 (linux_low_filter_event): Add lwp and thread for exec'ing
2911 non-leader thread if leader thread has been deleted.
2912 Refactor code into linux_arch_setup_thread and call it.
2913 Pass child lwp pointer by reference to handle_extended_wait.
2914 (linux_wait_for_event_filtered): Update comment.
2915 (linux_wait_1): Prevent clobbering exec event status.
2916 (linux_supports_exec_events): New function.
2917 (linux_target_ops) <supports_exec_events>: Initialize new member.
2918 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2920 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2921 * server.c (report_exec_events): New global variable.
2922 (handle_query): Handle qSupported query for exec-events feature.
2923 (captured_main): Initialize report_exec_events.
2924 * server.h (report_exec_events): Declare new global variable.
2925 * target.h (struct target_ops) <supports_exec_events>: New
2927 (target_supports_exec_events): New macro.
2928 * win32-low.c (win32_target_ops) <supports_exec_events>:
2929 Initialize new member.
2931 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2933 * linux-low.c (linux_low_enable_btrace): Remove.
2934 (linux_target_ops): Replace linux_low_enable_btrace with
2935 linux_enable_btrace.
2937 2015-09-03 Yao Qi <yao.qi@linaro.org>
2939 * linux-aarch64-low.c (aarch64_insert_point): Call
2940 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2943 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2945 * linux-low.c (check_stopped_by_breakpoint): Use
2946 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2948 2015-08-27 Pedro Alves <palves@redhat.com>
2950 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2952 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2954 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2955 the XNEW-family equivalent.
2956 (compile_bytecodes): Likewise.
2957 * dll.c (loaded_dll): Likewise.
2958 * event-loop.c (append_callback_event): Likewise.
2959 (create_file_handler): Likewise.
2960 (create_file_event): Likewise.
2961 * hostio.c (handle_open): Likewise.
2962 * inferiors.c (add_thread): Likewise.
2963 (add_process): Likewise.
2964 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2965 * linux-arm-low.c (arm_new_process): Likewise.
2966 (arm_new_thread): Likewise.
2967 * linux-low.c (add_to_pid_list): Likewise.
2968 (linux_add_process): Likewise.
2969 (handle_extended_wait): Likewise.
2970 (add_lwp): Likewise.
2971 (enqueue_one_deferred_signal): Likewise.
2972 (enqueue_pending_signal): Likewise.
2973 (linux_resume_one_lwp_throw): Likewise.
2974 (linux_resume_one_thread): Likewise.
2975 (linux_read_memory): Likewise.
2976 (linux_write_memory): Likewise.
2977 * linux-mips-low.c (mips_linux_new_process): Likewise.
2978 (mips_linux_new_thread): Likewise.
2979 (mips_add_watchpoint): Likewise.
2980 * linux-x86-low.c (initialize_low_arch): Likewise.
2981 * lynx-low.c (lynx_add_process): Likewise.
2982 * mem-break.c (set_raw_breakpoint_at): Likewise.
2983 (set_breakpoint): Likewise.
2984 (add_condition_to_breakpoint): Likewise.
2985 (add_commands_to_breakpoint): Likewise.
2986 (clone_agent_expr): Likewise.
2987 (clone_one_breakpoint): Likewise.
2988 * regcache.c (new_register_cache): Likewise.
2989 * remote-utils.c (look_up_one_symbol): Likewise.
2990 * server.c (queue_stop_reply): Likewise.
2991 (start_inferior): Likewise.
2992 (queue_stop_reply_callback): Likewise.
2993 (handle_target_event): Likewise.
2994 * spu-low.c (fetch_ppc_memory): Likewise.
2995 (store_ppc_memory): Likewise.
2996 * target.c (set_target_ops): Likewise.
2997 * thread-db.c (thread_db_load_search): Likewise.
2998 (try_thread_db_load_1): Likewise.
2999 * tracepoint.c (add_tracepoint): Likewise.
3000 (add_tracepoint_action): Likewise.
3001 (create_trace_state_variable): Likewise.
3002 (cmd_qtdpsrc): Likewise.
3003 (cmd_qtro): Likewise.
3004 (add_while_stepping_state): Likewise.
3005 * win32-low.c (child_add_thread): Likewise.
3006 (get_image_name): Likewise.
3008 2015-08-25 Yao Qi <yao.qi@linaro.org>
3010 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3012 2015-08-25 Yao Qi <yao.qi@linaro.org>
3014 * Makefile.in (aarch64-linux.o): New rule.
3015 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3017 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3018 (aarch64_init_debug_reg_state): Make it extern.
3019 (aarch64_linux_prepare_to_resume): Remove.
3021 2015-08-25 Yao Qi <yao.qi@linaro.org>
3023 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3024 lwp_arch_private_info and ptid_of_lwp.
3026 2015-08-25 Yao Qi <yao.qi@linaro.org>
3028 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3029 Find proc_info by find_process_pid. All callers updated.
3031 2015-08-25 Yao Qi <yao.qi@linaro.org>
3033 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3035 (debug_reg_change_callback): Remove.
3036 (aarch64_notify_debug_reg_change): Remove.
3038 2015-08-25 Yao Qi <yao.qi@linaro.org>
3040 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3041 Call current_lwp_ptid.
3043 2015-08-25 Yao Qi <yao.qi@linaro.org>
3045 * linux-aarch64-low.c (debug_reg_change_callback): Use
3048 2015-08-25 Yao Qi <yao.qi@linaro.org>
3050 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3052 2015-08-25 Yao Qi <yao.qi@linaro.org>
3054 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3056 2015-08-25 Yao Qi <yao.qi@linaro.org>
3058 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3061 2015-08-25 Yao Qi <yao.qi@linaro.org>
3063 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3065 (debug_reg_change_callback): Remove argument entry and add argument
3066 lwp. Remove local variable thread. Don't print thread id in the
3067 debugging output. Don't check whether pid of thread equals to pid.
3068 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3069 iterate_over_lwps instead find_inferior.
3071 2015-08-24 Pedro Alves <palves@redhat.com>
3073 * inferiors.c (get_first_process): New function.
3074 * inferiors.h (get_first_process): New declaration.
3075 * remote-utils.c (read_ptid): Default to the first process in the
3076 list, instead of to the current thread's process.
3078 2015-08-24 Pedro Alves <palves@redhat.com>
3080 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3081 * event-loop.c: Likewise.
3082 * remote-utils.c: Likewise.
3083 * tracepoint.c: Likewise.
3085 2015-08-24 Pedro Alves <palves@redhat.com>
3087 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3090 2015-08-21 Pedro Alves <palves@redhat.com>
3092 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3093 instead of literal 1.
3095 2015-08-21 Pedro Alves <palves@redhat.com>
3097 * tdesc.c (default_description): Explicitly zero-initialize.
3099 2015-08-21 Pedro Alves <palves@redhat.com>
3102 * inferiors.c (remove_thread): Discard any pending stop reply for
3104 * server.c (remove_all_on_match_pid): Rename to ...
3105 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3107 (discard_queued_stop_replies): Change parameter to a ptid. Now
3109 (handle_v_kill, kill_inferior_callback, captured_main)
3110 (process_serial_event): Adjust.
3111 * server.h (discard_queued_stop_replies): Declare.
3113 2015-08-21 Pedro Alves <palves@redhat.com>
3115 * linux-low.c (wait_for_sigstop): Always switch to no thread
3116 selected if the previously current thread dies.
3117 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3118 process instead of the current thread's.
3119 * remote-utils.c (input_interrupt): Don't check if there's no
3121 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3122 current thread to the general thread fails, error out.
3123 (handle_qxfer_auxv, handle_qxfer_libraries)
3124 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3125 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3126 (handle_query): Check if there's a thread selected instead of
3127 checking whether there's any thread in the thread list.
3128 (handle_qxfer_threads, handle_qxfer_btrace)
3129 (handle_qxfer_btrace_conf): Don't error out early if there's no
3130 thread in the thread list.
3131 (handle_v_cont, myresume): Don't set the current thread to the
3133 (process_serial_event) <Hg handling>: Also set thread_id if the
3134 previous general thread is still alive.
3135 (process_serial_event) <g/G handling>: If setting the current
3136 thread to the general thread fails, error out.
3137 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3138 thread's lwp instead of the current thread's.
3139 * target.c (set_desired_thread): If the desired thread was not
3140 found, leave the current thread pointing to NULL. Return an int
3141 (boolean) indicating success.
3142 * target.h (set_desired_thread): Change return type to int.
3144 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3146 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3147 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3149 (ps_get_thread_area): New function.
3151 2015-08-19 Gary Benson <gbenson@redhat.com>
3153 * hostio.c (handle_pread): Do not attempt to read more data
3154 than hostio_reply_with_data can fit in a packet.
3156 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3158 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3160 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3162 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3164 2015-08-06 Pedro Alves <palves@redhat.com>
3166 * tracepoint.c (expr_eval_result): Now an int.
3168 2015-08-06 Pedro Alves <palves@redhat.com>
3170 * gdbthread.h (struct regcache): Forward declare.
3171 (struct thread_info) <regcache_data>: Now a struct regcache
3173 * inferiors.c (inferior_regcache_data)
3174 (set_inferior_regcache_data): Now work with struct regcache
3176 * inferiors.h (struct regcache): Forward declare.
3177 (inferior_regcache_data, set_inferior_regcache_data): Now work
3178 with struct regcache pointers.
3179 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3180 (free_register_cache_thread): Remove struct regcache pointer
3183 2015-08-06 Pedro Alves <palves@redhat.com>
3185 * server.c (captured_main): On error, print the exception message
3186 to stderr, and if run_once is set, throw a quit.
3188 2015-08-06 Pedro Alves <palves@redhat.com>
3190 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3193 2015-08-06 Pedro Alves <palves@redhat.com>
3195 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3196 reading beyond the passed in buffer length.
3198 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3200 * tracepoint.c (symbol_list) <required>: Remove.
3202 2015-08-06 Pedro Alves <palves@redhat.com>
3204 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3205 count if stopping and suspending threads.
3206 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3207 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3208 (linux_detach): Complete an ongoing step-over.
3209 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3211 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3212 (linux_wait_1): If passing a signal to the inferior after
3213 finishing a step-over, unsuspend and re-resume all lwps. If we
3214 see a single-step event but the thread should be continuing, don't
3215 pass the trap to gdb.
3216 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3217 internal_error instead of gdb_assert.
3218 (enqueue_pending_signal): New function.
3219 (check_ptrace_stopped_lwp_gone): Add debug output.
3220 (start_step_over): Use internal_error instead of gdb_assert.
3221 (complete_ongoing_step_over): New function.
3222 (linux_resume_one_thread): Don't resume a suspended thread.
3223 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3226 2015-08-06 Pedro Alves <palves@redhat.com>
3228 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3229 (linux_thread_alive): Use lwp_is_marked_dead.
3230 (extended_event_reported): Delete.
3231 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3232 instead of extended_event_reported.
3233 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3235 (lwp_is_marked_dead): New function.
3236 (lwp_running): Use lwp_is_marked_dead.
3237 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3240 2015-08-06 Pedro Alves <palves@redhat.com>
3242 * linux-low.c (linux_wait_1): Move fork event output out of the
3243 !report_to_gdb check. Pass event_child->waitstatus to
3244 target_waitstatus_to_string instead of ourstatus.
3246 2015-08-04 Yao Qi <yao.qi@linaro.org>
3248 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3249 if current_thread is 32 bit.
3251 2015-08-04 Yao Qi <yao.qi@linaro.org>
3253 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3254 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3255 * server.c (extended_protocol): Remove "static".
3256 * server.h (extended_protocol): Declare it.
3258 2015-08-04 Yao Qi <yao.qi@linaro.org>
3260 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3261 both aarch64 and aarch32.
3262 (aarch64_set_pc): Likewise.
3264 2015-08-04 Yao Qi <yao.qi@linaro.org>
3266 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3267 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3268 arm-with-neon.xml to srv_xmlfiles.
3269 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3270 (is_64bit_tdesc): New function.
3271 (aarch64_linux_read_description): New function.
3272 (aarch64_arch_setup): Call aarch64_linux_read_description.
3273 (regs_info): Rename to regs_info_aarch64.
3274 (aarch64_regs_info): Return right regs_info.
3275 (initialize_low_arch): Call initialize_low_arch_aarch32.
3277 2015-08-04 Yao Qi <yao.qi@linaro.org>
3279 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3280 * linux-aarch32-low.c: New file.
3281 * linux-aarch32-low.h: New file.
3282 * linux-arm-low.c (arm_fill_gregset): Move it to
3283 linux-aarch32-low.c.
3284 (arm_store_gregset): Likewise.
3285 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3286 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3287 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3288 (regs_info): Rename to regs_info_arm.
3289 (arm_regs_info): Return regs_info_aarch32 if
3290 have_ptrace_getregset is 1 and target description is
3291 arm_with_neon or arm_with_vfpv3.
3292 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3293 Call initialize_low_arch_aarch32 instead.
3295 2015-08-04 Yao Qi <yao.qi@linaro.org>
3297 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3298 * linux-low.c: ... here.
3299 * linux-low.h (have_ptrace_getregset): Declare it.
3301 2015-08-04 Pedro Alves <palves@redhat.com>
3303 * thread-db.c (struct thread_db): Use new typedefs.
3304 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3306 (disable_thread_event_reporting): Cast result of dlsym to
3307 destination function pointer type.
3308 (thread_db_mourn): Use td_ta_delete_ftype.
3310 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3312 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3314 (CDX_BREAKPOINT): Define for R2.
3315 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3316 (the_low_target): Add comments.
3318 2015-07-30 Yao Qi <yao.qi@linaro.org>
3320 * linux-arm-low.c (arm_hwcap): Remove it.
3321 (arm_read_description): New local variable arm_hwcap. Don't
3322 set arm_hwcap to zero.
3324 2015-07-30 Yao Qi <yao.qi@linaro.org>
3326 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3327 Use regcache->tdesc instead.
3328 (arm_store_wmmxregset): Likewise.
3329 (arm_fill_vfpregset): Likewise.
3330 (arm_store_vfpregset): Likewise.
3332 2015-07-30 Yao Qi <yao.qi@linaro.org>
3334 * linux-arm-low.c: Include arch/arm.h.
3335 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3336 (arm_store_gregset): Likewise.
3338 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3340 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3341 ptrace's 4th parameter.
3343 2015-07-27 Yao Qi <yao.qi@linaro.org>
3345 * configure.srv (case aarch64*-*-linux*): Don't set
3348 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3350 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3352 * linux-arm-low.c: Likewise.
3353 * linux-cris-low.c: Likewise.
3354 * linux-crisv32-low.c: Likewise.
3355 * linux-low.c: Likewise.
3356 * linux-m68k-low.c: Likewise.
3357 * linux-mips-low.c: Likewise.
3358 * linux-nios2-low.c: Likewise.
3359 * linux-s390-low.c: Likewise.
3360 * linux-sparc-low.c: Likewise.
3361 * linux-tic6x-low.c: Likewise.
3362 * linux-tile-low.c: Likewise.
3363 * linux-x86-low.c: Likewise.
3365 2015-07-24 Pedro Alves <palves@redhat.com>
3367 * config.in: Regenerate.
3368 * configure: Regenerate.
3370 2015-07-24 Pedro Alves <palves@redhat.com>
3372 * acinclude.m4: Include ../ptrace.m4.
3373 * configure.ac: Call GDB_AC_PTRACE.
3374 * config.in, configure: Regenerate.
3376 2015-07-24 Yao Qi <yao.qi@linaro.org>
3378 * linux-low.c (linux_create_inferior): Remove setting to
3379 proc->priv->new_inferior.
3380 (linux_attach): Likewise.
3381 (linux_low_filter_event): Likewise.
3382 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3384 2015-07-24 Yao Qi <yao.qi@linaro.org>
3386 * linux-low.c (linux_arch_setup): New function.
3387 (linux_low_filter_event): If proc->tdesc is NULL and
3388 proc->attached is true, call the_low_target.arch_setup.
3389 Otherwise, keep status pending, and return.
3390 (linux_resume_one_lwp_throw): Don't call get_pc if
3391 thread->while_stepping isn't NULL. Don't call
3392 get_thread_regcache if proc->tdesc is NULL.
3393 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3394 (linux_target_ops): Install arch_setup.
3395 * server.c (start_inferior): Call the_target->arch_setup.
3396 * target.h (struct target_ops) <arch_setup>: New field.
3397 (target_arch_setup): New marco.
3398 * lynx-low.c (lynx_target_ops): Update.
3399 * nto-low.c (nto_target_ops): Update.
3400 * spu-low.c (spu_target_ops): Update.
3401 * win32-low.c (win32_target_ops): Update.
3403 2015-07-24 Yao Qi <yao.qi@linaro.org>
3405 * linux-low.c (linux_add_process): Don't set
3406 proc->priv->new_inferior.
3407 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3408 (linux_attach): Likewise.
3410 2015-07-24 Yao Qi <yao.qi@linaro.org>
3412 * server.c (start_inferior): Code refactor.
3414 2015-07-24 Yao Qi <yao.qi@linaro.org>
3416 * server.c (process_serial_event): Set general_thread.
3418 2015-07-21 Yao Qi <yao.qi@linaro.org>
3420 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3421 aarch64_linux_get_debug_reg_capacity.
3423 2015-07-17 Yao Qi <yao.qi@linaro.org>
3425 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3426 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3427 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3428 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3429 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3430 (AARCH64_HWP_ALIGNMENT): Likewise.
3431 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3432 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3433 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3434 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3435 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3436 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3437 (struct aarch64_debug_reg_state): Likewise.
3438 (struct arch_lwp_info): Likewise.
3439 (aarch64_align_watchpoint): Likewise.
3440 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3441 (aarch64_watchpoint_length): Likewise.
3442 (aarch64_point_encode_ctrl_reg): Likewise
3443 (aarch64_point_is_aligned): Likewise.
3444 (aarch64_align_watchpoint): Likewise.
3445 (aarch64_linux_set_debug_regs):
3446 (aarch64_dr_state_insert_one_point): Likewise.
3447 (aarch64_dr_state_remove_one_point): Likewise.
3448 (aarch64_handle_breakpoint): Likewise.
3449 (aarch64_handle_aligned_watchpoint): Likewise.
3450 (aarch64_handle_unaligned_watchpoint): Likewise.
3451 (aarch64_handle_watchpoint): Likewise.
3453 2015-07-17 Yao Qi <yao.qi@linaro.org>
3455 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3456 and don't aarch64_get_debug_reg_state. All callers update.
3457 (aarch64_handle_aligned_watchpoint): Likewise.
3458 (aarch64_handle_unaligned_watchpoint): Likewise.
3459 (aarch64_handle_watchpoint): Likewise.
3460 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3461 (aarch64_remove_point): Likewise.
3463 2015-07-17 Yao Qi <yao.qi@linaro.org>
3465 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3467 (aarch64_handle_unaligned_watchpoint): Likewise.
3469 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3471 Revert the previous 3 commits:
3472 Move gdb_regex* to common/
3473 Move linux_find_memory_regions_full & co.
3474 gdbserver build-id attribute generator
3476 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3477 Jan Kratochvil <jan.kratochvil@redhat.com>
3479 gdbserver build-id attribute generator.
3480 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3481 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3482 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3484 (get_dynamic): Use find_pdhr to traverse program headers.
3485 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3486 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3487 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3488 (get_hex_build_id): New.
3489 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3490 to reply XML document.
3492 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3493 Jan Kratochvil <jan.kratochvil@redhat.com>
3495 * target.c: Include target/target-utils.h and fcntl.h.
3496 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3497 (target_fileio_read_stralloc): New functions.
3499 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3501 * Makefile.in (OBS): Add gdb_regex.o.
3503 * config.in: Rebuilt.
3504 * configure: Rebuilt.
3506 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3507 Jan Kratochvil <jan.kratochvil@redhat.com>
3509 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3510 * Makefile.in (OBS): Add target-utils.o.
3511 (linux-maps.o, target-utils.o): New.
3512 * configure.srv (srv_linux_obj): Add linux-maps.o.
3514 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3516 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3518 (the_low_target): Install it.
3520 2015-07-14 Pedro Alves <palves@redhat.com>
3522 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3523 Instead, ignore ECHILD, and throw an error for other errnos.
3525 2015-07-10 Pedro Alves <palves@redhat.com>
3527 * event-loop.c (struct callback_event) <data>: Change type to
3528 gdb_client_data instance instead of gdb_client_data pointer.
3529 (append_callback_event): Adjust.
3531 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3533 * linux-aarch64-low.c: Add comments for each linux_target_ops
3534 method. Remove comments already covered in target_ops and
3535 linux_target_ops definitions.
3536 (the_low_target): Add comments for each unimplemented method.
3538 2015-07-09 Yao Qi <yao.qi@linaro.org>
3540 * linux-aarch64-low.c (aarch64_regmap): Remove.
3541 (aarch64_usrregs_info): Remove.
3542 (regs_info): Set field usrregs to NULL.
3544 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3546 * linux-low.c: Include "rsp-low.h"
3547 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3548 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3549 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3550 (handle_btrace_enable_pt): New.
3551 (handle_btrace_general_set): Support "pt".
3552 (handle_btrace_conf_general_set): Support "pt:size".
3554 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3556 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3559 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3561 * linux-aarch64-low.c: Remove comment about endianness.
3562 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3563 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3566 2015-06-24 Gary Benson <gbenson@redhat.com>
3568 * linux-i386-ipa.c (stdint.h): Do not include.
3569 * lynx-i386-low.c (stdint.h): Likewise.
3570 * lynx-ppc-low.c (stdint.h): Likewise.
3571 * mem-break.c (stdint.h): Likewise.
3572 * thread-db.c (stdint.h): Likewise.
3573 * tracepoint.c (stdint.h): Likewise.
3574 * win32-low.c (stdint.h): Likewise.
3576 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3578 * server.c (write_qxfer_response): Update call to
3579 remote_escape_output.
3581 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3582 Jan Kratochvil <jan.kratochvil@redhat.com>
3584 Merge multiple hex conversions.
3585 * gdbreplay.c (tohex): Rename to 'fromhex'.
3586 (logchar): Use fromhex.
3588 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3590 * server.c (handle_qxfer_libraries): Set `version' attribute for
3593 2015-06-10 Gary Benson <gbenson@redhat.com>
3595 * target.h (struct target_ops) <multifs_open>: New field.
3596 <multifs_unlink>: Likewise.
3597 <multifs_readlink>: Likewise.
3598 * linux-low.c (nat/linux-namespaces.h): New include.
3599 (linux_target_ops): Initialize the_target->multifs_open,
3600 the_target->multifs_unlink and the_target->multifs_readlink.
3601 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3602 * hostio.c (hostio_fs_pid): New static variable.
3603 (hostio_handle_new_gdb_connection): New function.
3604 (handle_setfs): Likewise.
3605 (handle_open): Use the_target->multifs_open as appropriate.
3606 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3607 (handle_readlink): Use the_target->multifs_readlink as
3609 (handle_vFile): Handle vFile:setfs packets.
3610 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3611 after target_handle_new_gdb_connection.
3613 2015-06-10 Gary Benson <gbenson@redhat.com>
3615 * configure.ac (AC_CHECK_FUNCS): Add setns.
3616 * config.in: Regenerate.
3617 * configure: Likewise.
3618 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3619 (linux-namespaces.o): New rule.
3620 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3622 2015-06-09 Gary Benson <gbenson@redhat.com>
3624 * hostio.c (handle_open): Process mode argument with
3625 fileio_to_host_mode.
3627 2015-06-01 Yao Qi <yao.qi@linaro.org>
3629 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3630 * linux-x86-low.c: Likewise.
3632 2015-05-28 Don Breazeal <donb@codesourcery.com>
3634 * linux-low.c (handle_extended_wait): Initialize
3635 thread_info.last_resume_kind for new fork children.
3637 2015-05-15 Pedro Alves <palves@redhat.com>
3639 * target.h (target_handle_new_gdb_connection): Rewrite using if
3640 wrapped in do/while.
3642 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3644 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3645 * configure, config.in: Regenerate.
3646 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3649 2015-05-12 Don Breazeal <donb@codesourcery.com>
3651 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3652 PTRACE_EVENT_VFORK_DONE.
3653 (linux_low_ptrace_options, extended_event_reported): Add vfork
3655 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3656 and "vforkdone" for RSP 'T' Stop Reply Packet.
3657 * server.h (report_vfork_events): Declare
3660 2015-05-12 Don Breazeal <donb@codesourcery.com>
3662 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3663 (the_low_target) <new_fork>: Initialize new member.
3664 * linux-arm-low.c (arm_new_fork): New function.
3665 (the_low_target) <new_fork>: Initialize new member.
3666 * linux-low.c (handle_extended_wait): Call new target function
3668 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3669 * linux-mips-low.c (mips_add_watchpoint): New function
3670 extracted from mips_insert_point.
3671 (the_low_target) <new_fork>: Initialize new member.
3672 (mips_linux_new_fork): New function.
3673 (mips_insert_point): Call mips_add_watchpoint.
3674 * linux-x86-low.c (x86_linux_new_fork): New function.
3675 (the_low_target) <new_fork>: Initialize new member.
3677 2015-05-12 Don Breazeal <donb@codesourcery.com>
3679 * linux-low.c (handle_extended_wait): Implement return value,
3680 rename argument 'event_child' to 'event_lwp', handle
3681 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3682 (linux_low_ptrace_options): New function.
3683 (linux_low_filter_event): Call linux_low_ptrace_options,
3684 use different argument fo linux_enable_event_reporting,
3685 use return value from handle_extended_wait.
3686 (extended_event_reported): New function.
3687 (linux_wait_1): Call extended_event_reported and set
3688 status to report fork events.
3689 (linux_write_memory): Add pid to debug message.
3690 (reset_lwp_ptrace_options_callback): New function.
3691 (linux_handle_new_gdb_connection): New function.
3692 (linux_target_ops): Initialize new structure member.
3693 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3694 * lynx-low.c: Initialize new structure member.
3695 * remote-utils.c (prepare_resume_reply): Implement stop reason
3696 "fork" for "T" stop message.
3697 * server.c (handle_query): Call handle_new_gdb_connection.
3698 * server.h (report_fork_events): Declare global flag.
3699 * target.h (struct target_ops) <handle_new_gdb_connection>:
3701 (target_handle_new_gdb_connection): New macro.
3702 * win32-low.c: Initialize new structure member.
3704 2015-05-12 Don Breazeal <donb@codesourcery.com>
3706 * mem-break.c (APPEND_TO_LIST): Define macro.
3707 (clone_agent_expr): New function.
3708 (clone_one_breakpoint): New function.
3709 (clone_all_breakpoints): New function.
3710 * mem-break.h: Declare new functions.
3712 2015-05-12 Don Breazeal <donb@codesourcery.com>
3714 * linux-low.c (linux_supports_fork_events): New function.
3715 (linux_supports_vfork_events): New function.
3716 (linux_target_ops): Initialize new structure members.
3717 (initialize_low): Call linux_check_ptrace_features.
3718 * lynx-low.c (lynx_target_ops): Initialize new structure
3720 * server.c (report_fork_events, report_vfork_events):
3722 (handle_query): Add new features to qSupported packet and
3724 (captured_main): Initialize new global variables.
3725 * target.h (struct target_ops) <supports_fork_events>:
3727 <supports_vfork_events>: New member.
3728 (target_supports_fork_events): New macro.
3729 (target_supports_vfork_events): New macro.
3730 * win32-low.c (win32_target_ops): Initialize new structure
3733 2015-05-12 Gary Benson <gbenson@redhat.com>
3735 * server.c (handle_qxfer_exec_file): Use current process
3738 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3740 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3741 Remove HAVE_PTRACE_GETREGS conditionals.
3742 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3743 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3745 2015-05-08 Yao Qi <yao.qi@linaro.org>
3747 * linux-low.c (linux_supports_conditional_breakpoints): New
3749 (linux_target_ops): Install new target method.
3750 * lynx-low.c (lynx_target_ops): Install NULL hook for
3751 supports_conditional_breakpoints.
3752 * nto-low.c (nto_target_ops): Likewise.
3753 * spu-low.c (spu_target_ops): Likewise.
3754 * win32-low.c (win32_target_ops): Likewise.
3755 * server.c (handle_query): Check
3756 target_supports_conditional_breakpoints.
3757 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3759 (target_supports_conditional_breakpoints): New macro.
3761 2015-05-06 Pedro Alves <palves@redhat.com>
3764 * server.c (start_inferior): If the process exits, mourn it.
3766 2015-04-21 Gary Benson <gbenson@redhat.com>
3768 * hostio.c (fileio_open_flags_to_host): Factored out to
3769 fileio_to_host_openflags in common/fileio.c. Single use
3772 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3774 * linux-xtensa-low.c (xtensa_fill_gregset)
3775 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3778 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3780 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3781 (regs_info): Replace usrregs pointer with NULL.
3783 2015-04-17 Gary Benson <gbenson@redhat.com>
3785 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3786 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3787 * server.c (handle_qxfer_exec_file): New function.
3788 (qxfer_packets): Add exec-file entry.
3789 (handle_query): Report qXfer:exec-file:read as supported packet.
3791 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3793 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3795 2015-04-09 Gary Benson <gbenson@redhat.com>
3797 * hostio-errno.c (errno_to_fileio_error): Remove function.
3798 Update caller to use remote_fileio_to_fio_error.
3800 2015-04-09 Yao Qi <yao.qi@linaro.org>
3802 * linux-low.c (linux_insert_point): Call
3803 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3804 (linux_remove_point): Call remove_memory_breakpoint if type is
3806 * linux-x86-low.c (x86_insert_point): Don't call
3807 insert_memory_breakpoint.
3808 (x86_remove_point): Don't call remove_memory_breakpoint.
3810 2015-04-01 Pedro Alves <palves@redhat.com>
3811 Cleber Rosa <crosa@redhat.com>
3813 * server.c (gdbserver_usage): Reorganize and extend the usage
3816 2015-03-24 Pedro Alves <palves@redhat.com>
3818 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3819 output. Also dump TRAP_TRACE.
3820 (linux_low_filter_event): In debug output, distinguish a
3821 resume_stop SIGSTOP from a delayed SIGSTOP.
3823 2015-03-24 Gary Benson <gbenson@redhat.com>
3825 * linux-x86-low.c (x86_linux_new_thread): Moved to
3827 (x86_linux_prepare_to_resume): Likewise.
3829 2015-03-24 Gary Benson <gbenson@redhat.com>
3831 * Makefile.in (x86-linux-dregs.o): New rule.
3832 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3833 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3834 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3835 (x86_linux_dr_get): Likewise.
3836 (x86_linux_dr_set): Likewise.
3837 (update_debug_registers_callback): Likewise.
3838 (x86_linux_dr_set_addr): Likewise.
3839 (x86_linux_dr_get_addr): Likewise.
3840 (x86_linux_dr_set_control): Likewise.
3841 (x86_linux_dr_get_control): Likewise.
3842 (x86_linux_dr_get_status): Likewise.
3843 (x86_linux_update_debug_registers): Likewise.
3845 2015-03-24 Gary Benson <gbenson@redhat.com>
3847 * linux-x86-low.c (x86_linux_update_debug_registers):
3848 New function, factored out from...
3849 (x86_linux_prepare_to_resume): ...this.
3851 2015-03-24 Gary Benson <gbenson@redhat.com>
3853 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3854 (x86_linux_dr_set): Likewise.
3855 (update_debug_registers_callback): Likewise.
3856 (x86_linux_dr_set_addr): Likewise.
3857 (x86_linux_dr_get_addr): Likewise.
3858 (x86_linux_dr_set_control): Likewise.
3859 (x86_linux_dr_get_control): Likewise.
3860 (x86_linux_dr_get_status): Likewise.
3861 (x86_linux_prepare_to_resume): Likewise.
3863 2015-03-24 Gary Benson <gbenson@redhat.com>
3865 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3866 Use perror_with_name. Pass string through gettext.
3867 (x86_linux_dr_set): Likewise.
3869 2015-03-24 Gary Benson <gbenson@redhat.com>
3871 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3872 (x86_linux_dr_set_addr): ...this.
3873 (x86_dr_low_get_addr): Rename to...
3874 (x86_linux_dr_get_addr): ...this.
3875 (x86_dr_low_set_control): Rename to...
3876 (x86_linux_dr_set_control): ...this.
3877 (x86_dr_low_get_control): Rename to...
3878 (x86_linux_dr_get_control): ...this.
3879 (x86_dr_low_get_status): Rename to...
3880 (x86_linux_dr_get_status): ...this.
3881 (x86_dr_low): Update with new function names.
3883 2015-03-24 Gary Benson <gbenson@redhat.com>
3885 * Makefile.in (x86-linux.o): New rule.
3886 * configure.srv: Add x86-linux.o to relevant targets.
3887 * linux-low.c (lwp_set_arch_private_info): New function.
3888 (lwp_arch_private_info): Likewise.
3889 * linux-x86-low.c: Include nat/x86-linux.h.
3890 (arch_lwp_info): Removed structure.
3891 (update_debug_registers_callback):
3892 Use lwp_set_debug_registers_changed.
3893 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3894 and lwp_set_debug_registers_changed.
3895 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3897 2015-03-24 Gary Benson <gbenson@redhat.com>
3899 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3900 * linux-arm-low.c (arm_new_thread): Likewise.
3901 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3902 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3903 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3904 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3906 2015-03-24 Gary Benson <gbenson@redhat.com>
3908 * linux-low.c (ptid_of_lwp): New function.
3909 (lwp_is_stopped): Likewise.
3910 (lwp_stop_reason): Likewise.
3911 * linux-x86-low.c (update_debug_registers_callback):
3913 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3916 2015-03-24 Gary Benson <gbenson@redhat.com>
3918 * linux-low.h (linux_stop_lwp): Remove declaration.
3920 2015-03-24 Gary Benson <gbenson@redhat.com>
3922 * linux-low.h: Include nat/linux-nat.h.
3923 * linux-low.c (iterate_over_lwps_args): New structure.
3924 (iterate_over_lwps_filter): New function.
3925 (iterate_over_lwps): Likewise.
3926 * linux-x86-low.c (update_debug_registers_callback):
3927 Update signature to what iterate_over_lwps expects.
3928 Remove PID check that iterate_over_lwps now performs.
3929 (x86_dr_low_set_addr): Use iterate_over_lwps.
3930 (x86_dr_low_set_control): Likewise.
3932 2015-03-24 Gary Benson <gbenson@redhat.com>
3934 * linux-x86-low.c (x86_debug_reg_state): New function.
3935 (x86_linux_prepare_to_resume): Use the above.
3937 2015-03-24 Gary Benson <gbenson@redhat.com>
3939 * linux-low.c (current_lwp_ptid): New function.
3940 * linux-x86-low.c: Include nat/linux-nat.h.
3941 (x86_dr_low_get_addr): Use current_lwp_ptid.
3942 (x86_dr_low_get_control): Likewise.
3943 (x86_dr_low_get_status): Likewise.
3945 2015-03-20 Pedro Alves <palves@redhat.com>
3947 * tracepoint.c (cmd_qtstatus): Make "str" const.
3949 2015-03-20 Pedro Alves <palves@redhat.com>
3951 * server.c (handle_general_set): Make "req_str" const.
3953 2015-03-19 Pedro Alves <palves@redhat.com>
3955 * linux-low.c (linux_resume_one_lwp): Rename to ...
3956 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3957 instead call perror_with_name.
3958 (check_ptrace_stopped_lwp_gone): New function.
3959 (linux_resume_one_lwp): Reimplement as wrapper around
3960 linux_resume_one_lwp_throw that swallows errors if the LWP is
3963 2015-03-19 Pedro Alves <palves@redhat.com>
3965 * linux-low.c (count_events_callback, select_event_lwp_callback):
3966 No longer check whether the thread has resume_stop as last resume
3969 2015-03-19 Pedro Alves <palves@redhat.com>
3971 * linux-low.c (count_events_callback, select_event_lwp_callback):
3972 Use the lwp's status_pending_p field, not the thread's.
3974 2015-03-19 Pedro Alves <palves@redhat.com>
3976 * linux-low.c (select_event_lwp_callback): Update comments to
3977 no longer mention SIGTRAP.
3979 2015-03-18 Gary Benson <gbenson@redhat.com>
3981 * server.c (handle_query): Do not report vFile:fstat as supported.
3983 2015-03-11 Gary Benson <gbenson@redhat.com>
3985 * hostio.c (sys/types.h): New include.
3986 (sys/stat.h): Likewise.
3987 (common-remote-fileio.h): Likewise.
3988 (handle_fstat): New function.
3989 (handle_vFile): Handle vFile:fstat packets.
3991 2015-03-11 Gary Benson <gbenson@redhat.com>
3993 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3994 struct stat.st_blocks and struct stat.st_blksize.
3995 * configure: Regenerate.
3996 * config.in: Likewise.
3997 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3998 (OBS): Add common-remote-fileio.o.
3999 (common-remote-fileio.o): New rule.
4001 2015-03-09 Pedro Alves <palves@redhat.com>
4003 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4004 'struct sockaddr' pointer in 'accept' call.
4006 2015-03-09 Pedro Alves <palves@redhat.com>
4009 2015-03-07 Pedro Alves <palves@redhat.com>
4010 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4011 or <winsock2.h> here. Instead include "gdb_socket.h".
4012 (remote_open): Use union gdb_sockaddr_u.
4013 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4014 or <winsock2.h> here. Instead include "gdb_socket.h".
4015 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4016 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4018 (init_named_socket, gdb_agent_helper_thread): Use union
4021 2015-03-07 Pedro Alves <palves@redhat.com>
4023 * configure.ac (build_warnings): Move
4024 -Wdeclaration-after-statement to the C-specific set.
4025 * configure: Regenerate.
4027 2015-03-07 Pedro Alves <palves@redhat.com>
4029 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4030 or <winsock2.h> here. Instead include "gdb_socket.h".
4031 (remote_open): Use union gdb_sockaddr_u.
4032 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4033 or <winsock2.h> here. Instead include "gdb_socket.h".
4034 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4035 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4037 (init_named_socket, gdb_agent_helper_thread): Use union
4040 2015-03-07 Pedro Alves <palves@redhat.com>
4042 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4045 2015-03-06 Yao Qi <yao.qi@linaro.org>
4047 * linux-aarch64-low.c (aarch64_insert_point): Use
4048 show_debug_regs as a boolean.
4049 (aarch64_remove_point): Likewise.
4051 2015-03-05 Pedro Alves <palves@redhat.com>
4053 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4054 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4055 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4056 * nto-low.c (nto_target_ops): Likewise.
4057 * spu-low.c (spu_target_ops): Likewise.
4058 * win32-low.c (win32_target_ops): Likewise.
4060 2015-03-04 Pedro Alves <palves@redhat.com>
4062 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4063 Decide whether a breakpoint triggered based on the SIGTRAP's
4065 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4066 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4067 (linux_low_filter_event): Check for breakpoints before checking
4069 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4071 (linux_stopped_by_sw_breakpoint)
4072 (linux_supports_stopped_by_sw_breakpoint)
4073 (linux_stopped_by_hw_breakpoint)
4074 (linux_supports_stopped_by_hw_breakpoint): New functions.
4075 (linux_target_ops): Install new target methods.
4077 2015-03-04 Pedro Alves <palves@redhat.com>
4079 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4080 * server.c (swbreak_feature, hwbreak_feature): New globals.
4081 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4082 (captured_main): Clear swbreak_feature and hwbreak_feature.
4083 * server.h (swbreak_feature, hwbreak_feature): Declare.
4084 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4085 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4086 supports_stopped_by_hw_breakpoint>: New fields.
4087 (target_supports_stopped_by_sw_breakpoint)
4088 (target_stopped_by_sw_breakpoint)
4089 (target_supports_stopped_by_hw_breakpoint)
4090 (target_stopped_by_hw_breakpoint): Declare.
4092 2015-03-04 Pedro Alves <palves@redhat.com>
4094 enum lwp_stop_reason -> enum target_stop_reason
4095 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4096 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4097 (linux_wait_1, stuck_in_jump_pad_callback)
4098 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4099 (linux_stopped_by_watchpoint):
4100 * linux-low.h (enum lwp_stop_reason): Delete.
4101 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4102 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4104 2015-03-04 Yao Qi <yao.qi@linaro.org>
4106 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4108 2015-03-03 Gary Benson <gbenson@redhat.com>
4110 * hostio.c (handle_vFile): Fix prefix lengths.
4112 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4114 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4117 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4119 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4120 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4121 (clean): Add "rm -f" for above C files.
4122 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4123 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4124 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4125 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4126 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4127 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4128 (init_registers_s390x_vx_linux64)
4129 (init_registers_s390x_tevx_linux64)
4130 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4131 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4133 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4134 (s390_store_vxrs_high): New functions.
4135 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4137 (s390_arch_setup): Add logic for selecting one of the new target
4138 descriptions. Activate the new vector regsets if applicable.
4139 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4140 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4141 and init_registers_s390x_tevx_linux64.
4143 2015-03-01 Pedro Alves <palves@redhat.com>
4145 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4148 2015-02-27 Pedro Alves <palves@redhat.com>
4150 * linux-x86-low.c (u_debugreg_offset): New function.
4151 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4153 2015-02-27 Pedro Alves <palves@redhat.com>
4155 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4156 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4157 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4158 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4159 (ps_lsetfpregs, ps_getpid)
4160 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4161 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4162 (ps_lsetxregs, ps_plog): Declare.
4164 2015-02-27 Pedro Alves <palves@redhat.com>
4166 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4167 IP_AGENT_EXPORT_FUNC.
4168 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4169 IP_AGENT_EXPORT_FUNC.
4170 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4171 (IP_AGENT_EXPORT): Delete.
4172 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4173 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4174 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4175 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4176 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4177 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4178 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4179 (traceframe_read_count, traceframe_write_count)
4180 (traceframes_created, trace_state_variables, get_raw_reg)
4181 (get_trace_state_variable_value, set_trace_state_variable_value)
4182 (ust_loaded, helper_thread_id, cmd_buf): Use
4183 IPA_SYM_EXPORTED_NAME.
4184 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4185 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4186 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4187 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4188 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4189 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4190 EXTERN_C_PUSH/EXTERN_C_POP.
4191 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4192 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4193 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4194 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4195 (traceframe_write_count, traceframe_read_count)
4196 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4197 (about_to_request_buffer_space, get_trace_state_variable_value)
4198 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4199 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4200 EXTERN_C_PUSH/EXTERN_C_POP.
4201 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4202 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4203 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4204 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4205 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4206 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4207 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4208 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4210 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4211 (IP_AGENT_EXPORT_VAR_DECL): Define.
4213 (gdb_agent_get_raw_reg): Declare.
4215 2015-02-27 Tom Tromey <tromey@redhat.com>
4216 Pedro Alves <palves@redhat.com>
4218 Rename symbols whose names are reserved C++ keywords throughout.
4220 2015-02-27 Pedro Alves <palves@redhat.com>
4222 * Makefile.in (COMPILER): New, get it from autoconf.
4223 (CXX): Get from autoconf instead.
4224 (COMPILE.pre): Use COMPILER.
4225 (CC-LD): Rename to ...
4226 (CC_LD): ... this. Use COMPILER.
4227 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4228 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4229 * acinclude.m4: Include build-with-cxx.m4.
4230 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4231 Disable -Werror by default if building in C++ mode.
4232 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4233 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4234 the C++ compiler. Save/restore CXXFLAGS too.
4235 * configure: Regenerate.
4237 2015-02-27 Pedro Alves <palves@redhat.com>
4239 * acinclude.m4: Include libiberty.m4.
4240 * configure.ac: Call libiberty_INIT.
4241 * config.in, configure: Regenerate.
4243 2015-02-26 Pedro Alves <palves@redhat.com>
4245 * linux-low.c (linux_wait_1): When incrementing the PC past a
4246 program breakpoint always use the_low_target.breakpoint_len as
4247 increment, rather than the maximum between that and
4248 the_low_target.decr_pc_after_break.
4250 2015-02-23 Pedro Alves <palves@redhat.com>
4252 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4253 thread was doing a step-over; always adjust the PC if
4254 we stepped over a permanent breakpoint.
4255 (linux_wait_1): If we stepped over breakpoint that was on top of a
4256 permanent breakpoint, manually advance the PC past it.
4258 2015-02-23 Pedro Alves <palves@redhat.com>
4260 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4262 (x86_fill_gregset, x86_store_gregset): Use it when handling
4265 2015-02-20 Pedro Alves <palves@redhat.com>
4267 * thread-db.c: Include "nat/linux-procfs.h".
4268 (thread_db_init): Skip listing new threads if the kernel supports
4269 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4271 2015-02-20 Pedro Alves <palves@redhat.com>
4273 * linux-low.c (status_pending_p_callback): Use ptid_match.
4275 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4277 PR breakpoints/16812
4278 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4279 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4280 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4282 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4284 PR breakpoints/15956
4285 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4287 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4289 * linux-low.c (linux_low_btrace_conf): Print size.
4290 * server.c (handle_btrace_conf_general_set): New.
4291 (hanle_general_set): Call handle_btrace_conf_general_set.
4292 (handle_query): Report Qbtrace-conf:bts:size as supported.
4294 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4296 * linux-low.c (linux_low_enable_btrace): Update parameters.
4297 (linux_low_btrace_conf): New.
4298 (linux_target_ops)<to_btrace_conf>: Initialize.
4299 * server.c (current_btrace_conf): New.
4300 (handle_btrace_enable): Rename to ...
4301 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4302 to target_enable_btrace. Update comment. Update users.
4303 (handle_qxfer_btrace_conf): New.
4304 (qxfer_packets): Add btrace-conf entry.
4305 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4306 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4307 (target_ops)<read_btrace_conf>: New.
4308 (target_enable_btrace): Update parameters.
4309 (target_read_btrace_conf): New.
4311 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4313 * server.c (handle_btrace_general_set): Remove call to
4314 target_supports_btrace.
4315 (supported_btrace_packets): New.
4316 (handle_query): Call supported_btrace_packets.
4317 * target.h: include btrace-common.h.
4318 (btrace_target_info): Removed.
4319 (supports_btrace, target_supports_btrace): Update parameters.
4321 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4323 * Makefile.in (SFILES): Add common/btrace-common.c.
4324 (OBS): Add common/btrace-common.o.
4325 (btrace-common.o): Add build rules.
4326 * linux-low: Include btrace-common.h.
4327 (linux_low_read_btrace): Use struct btrace_data. Call
4328 btrace_data_init and btrace_data_fini.
4330 2015-02-06 Pedro Alves <palves@redhat.com>
4332 * thread-db.c (find_new_threads_callback): Add debug output.
4334 2015-02-04 Pedro Alves <palves@redhat.com>
4336 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4337 (resume_stopped_resumed_lwps): New function.
4338 (linux_wait_for_event_filtered): Use it.
4340 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4342 * Makefile.in (SFILES): Add linux-personality.c.
4343 (linux-personality.o): New rule.
4344 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4345 list of objects to be built.
4346 * linux-low.c: Include nat/linux-personality.h.
4347 (linux_create_inferior): Remove code to disable address space
4348 randomization (moved to ../nat/linux-personality.c). Create
4349 cleanup to disable address space randomization.
4351 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4353 * Makefile.in (posix-strerror.o): New rule.
4354 (mingw-strerror.o): Likewise.
4355 * configure: Regenerated.
4356 * configure.ac: Source file ../common/common.host. Initialize new
4357 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4359 2015-01-14 Yao Qi <yao@codesourcery.com>
4361 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4362 (ppc-linux.o): New rule.
4363 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4364 * configure.ac: AC_CHECK_FUNCS(getauxval).
4365 * config.in: Re-generated.
4366 * configure: Re-generated.
4367 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4368 ppc64_64bit_inferior_p
4370 2015-01-14 Yao Qi <yao@codesourcery.com>
4372 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4373 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4374 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4375 (PT_ORIG_R3, PT_TRAP): Likewise.
4376 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4377 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4378 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4380 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4382 * i387-fp.c (i387_cache_to_xsave): In look over
4383 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4384 zmmh_low_space field by use of zmmh_high_space.
4386 2015-01-09 Pedro Alves <palves@redhat.com>
4388 * linux-low.c (step_over_bkpt): Move higher up in the file.
4389 (handle_extended_wait): Don't store the stop_pc here.
4390 (get_stop_pc): Adjust comments and rename to ...
4391 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4392 stopped for a software breakpoint or hardware breakpoint.
4393 (thread_still_has_status_pending_p): New function.
4394 (status_pending_p_callback): Use
4395 thread_still_has_status_pending_p. If the event is no longer
4396 interesting, resume the LWP.
4397 (handle_tracepoints): Add assert.
4398 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4399 (wstatus_maybe_breakpoint): New function.
4400 (cancel_breakpoint): Delete function.
4401 (check_stopped_by_watchpoint): New function, factored out from
4402 linux_low_filter_event.
4403 (lp_status_maybe_breakpoint): Delete function.
4404 (linux_low_filter_event): Remove filter_ptid argument.
4405 Leave thread group exits pending here. Store the LWP's stop PC.
4406 Always leave events pending.
4407 (linux_wait_for_event_filtered): Pull all events out of the
4408 kernel, and leave them all pending.
4409 (count_events_callback, select_event_lwp_callback): Consider all
4411 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4412 (select_event_lwp): Only give preference to the stepping LWP in
4413 all-stop mode. Adjust comments.
4414 (ignore_event): New function.
4415 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4416 references to cancel_breakpoints. Adjust to renames. Also give
4417 equal priority to all LWPs that have had events in non-stop mode.
4418 If reporting a software breakpoint event, unadjust the LWP's PC.
4419 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4420 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4422 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4423 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4424 (linux_stopped_by_watchpoint): Adjust.
4425 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4426 * linux-low.h (enum lwp_stop_reason): New.
4427 (struct lwp_info) <stop_pc>: Adjust comment.
4428 <stopped_by_watchpoint>: Delete field.
4429 <stop_reason>: New field.
4430 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4431 * mem-break.c (software_breakpoint_inserted_here)
4432 (hardware_breakpoint_inserted_here): New function.
4433 * mem-break.h (software_breakpoint_inserted_here)
4434 (hardware_breakpoint_inserted_here): Declare.
4435 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4436 (cancel_breakpoints): Delete.
4437 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4438 (upload_fast_traceframes): Remove references to
4441 2015-01-09 Pedro Alves <palves@redhat.com>
4443 * thread-db.c (find_new_threads_callback): Ignore thread if the
4444 kernel thread ID is -1.
4446 2015-01-09 Pedro Alves <palves@redhat.com>
4448 * linux-low.c (linux_attach_fail_reason_string): Move to
4449 nat/linux-ptrace.c, and rename.
4450 (linux_attach_lwp): Update comment.
4451 (attach_proc_task_lwp_callback): New function.
4452 (linux_attach): Adjust to rename and use
4453 linux_proc_attach_tgid_threads.
4454 (linux_attach_fail_reason_string): Delete declaration.
4456 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4458 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4459 * server.c (gdbserver_version): Likewise.
4461 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4463 * remote-utils.c: Include ctype.h.
4464 (input_interrupt): Explicitly handle the case when the char
4465 received is the NUL byte. Improve the printing of non-ASCII
4468 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4470 * linux-low.c (linux_low_filter_event): Update call to
4471 linux_enable_event_reporting following the addition of
4472 a new parameter to that function.
4474 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4477 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4478 (AARCH64_FPCR_REGNO): Likewise.
4479 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4480 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4481 (aarch64_store_fpregset): Likewise.
4483 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4485 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4486 Remove FIXME comment about assumption about N.
4488 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4490 * configure.ac: If large-file support is disabled in GDBserver,
4491 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4492 * configure: Regenerate.
4494 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4496 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4497 warning upon ENODATA from ptrace.
4498 * linux-s390-low.c (s390_store_tdb): New.
4499 (s390_regsets): Add regset for NT_S390_TDB.
4501 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4503 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4504 without a fill_function.
4505 * linux-s390-low.c (s390_fill_last_break): Remove.
4506 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4507 (s390_arch_setup): Use regset's size instead of fill_function for
4510 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4512 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4513 the regset's store function when ptrace returned an error.
4514 * regcache.c (get_thread_regcache): Invalidate register cache
4515 before fetching inferior's registers.
4517 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4519 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4520 while-loop as for-loop.
4521 (regsets_store_inferior_registers): Likewise.
4523 2014-11-28 Yao Qi <yao@codesourcery.com>
4525 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4526 * config.in, configure: Re-generate.
4527 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4530 2014-11-21 Yao Qi <yao@codesourcery.com>
4532 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4533 (AC_CHECK_HEADERS): Remove malloc.h.
4534 * configure: Re-generated.
4535 * config.in: Re-generated.
4536 * server.h: Don't include alloca.h and malloc.h.
4537 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4538 Don't include malloc.h.
4540 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4542 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4543 corresponding ERRNO check in same block.
4545 2014-11-12 Pedro Alves <palves@redhat.com>
4547 * server.c (cont_thread): Update comment.
4548 (start_inferior, attach_inferior): No longer clear cont_thread.
4549 (handle_v_cont): No longer set cont_thread.
4550 (captured_main): Clear cont_thread each time a GDB connects.
4552 2014-11-12 Pedro Alves <palves@redhat.com>
4554 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4555 thread, and don't resume all threads if the Hc thread has exited.
4557 2014-11-12 Pedro Alves <palves@redhat.com>
4559 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4560 the process group instead of to a specific LWP.
4562 2014-10-15 Pedro Alves <palves@redhat.com>
4565 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4567 (arm_set_thread_context): Delete.
4568 (the_low_target): Adjust.
4569 * win32-i386-low.c (debug_registers_changed)
4570 (debug_registers_used): Delete.
4571 (update_debug_registers_callback): New function.
4572 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4573 needing to update their debug registers.
4574 (win32_get_current_dr): New function.
4575 (x86_dr_low_get_addr, x86_dr_low_get_control)
4576 (x86_dr_low_get_status): Fetch the debug register from the thread
4578 (i386_initial_stuff): Adjust.
4579 (i386_get_thread_context): Remove current_event parameter. Don't
4580 clear debug_registers_changed nor copy DR values to
4582 (i386_set_thread_context): Delete.
4583 (i386_prepare_to_resume): New function.
4584 (i386_thread_added): Mark the thread as needing to update irs
4586 (the_low_target): Remove i386_set_thread_context and install
4587 i386_prepare_to_resume.
4588 * win32-low.c (win32_get_thread_context): Adjust.
4589 (win32_set_thread_context): Use SetThreadContext
4591 (win32_prepare_to_resume): New function.
4592 (win32_require_context): New function, factored out from ...
4593 (thread_rec): ... this.
4594 (continue_one_thread): Call win32_prepare_to_resume on each thread
4595 we're about to continue.
4596 (win32_resume): Call win32_prepare_to_resume on the event thread.
4597 * win32-low.h (struct win32_thread_info)
4598 <debug_registers_changed>: New field.
4599 (struct win32_target_ops): Change prototype of set_thread_context,
4600 delete set_thread_context and add prepare_to_resume.
4601 (win32_require_context): New declaration.
4603 2014-10-08 Gary Benson <gbenson@redhat.com>
4605 * server.h: Do not include common-exceptions.h.
4607 2014-10-08 Gary Benson <gbenson@redhat.com>
4609 * server.h: Do not include cleanups.h.
4611 2014-09-30 James Hogan <james.hogan@imgtec.com>
4613 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4616 2014-09-23 Yao Qi <yao@codesourcery.com>
4618 * linux-low.c (lp_status_maybe_breakpoint): New function.
4619 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4620 (count_events_callback): Likewise.
4621 (select_event_lwp_callback): Likewise.
4622 (cancel_breakpoints_callback): Likewise.
4624 2014-09-19 Don Breazeal <donb@codesourcery.com>
4626 * linux-low.c (handle_extended_wait): Call
4627 linux_ptrace_get_extended_event.
4628 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4629 linux_is_extended_waitstatus.
4631 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4633 * Makefile.in (CPPFLAGS): Define.
4634 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4635 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4637 2014-09-16 Gary Benson <gbenson@redhat.com>
4639 * inferiors.h (current_inferior): Renamed as...
4640 (current_thread): New variable. All uses updated.
4641 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4642 (maybe_move_out_of_jump_pad): Likewise.
4643 (cancel_breakpoint): Likewise.
4644 (linux_low_filter_event): Likewise.
4645 (wait_for_sigstop): Likewise.
4646 (linux_resume_one_lwp): Likewise.
4647 (need_step_over_p): Likewise.
4648 (start_step_over): Likewise.
4649 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4650 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4651 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4652 and save_inferior as saved_thread.
4653 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4655 (regcache_invalidate_thread): Likewise.
4656 * remote-utils.c (prepare_resume_reply): Likewise.
4657 * thread-db.c (thread_db_get_tls_address): Likewise.
4658 (disable_thread_event_reporting): Likewise.
4659 (remove_thread_event_breakpoints): Likewise.
4660 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4662 * target.h (set_desired_inferior): Renamed as...
4663 (set_desired_thread): New declaration. All uses updated.
4664 * server.c (myresume): Updated comment to reference thread instead
4666 (handle_serial_event): Likewise.
4667 (handle_target_event): Likewise.
4669 2014-09-12 Tom Tromey <tromey@redhat.com>
4670 Gary Benson <gbenson@redhat.com>
4672 * regcache.h: Include common-regcache.h.
4673 (regcache_read_pc): Don't declare.
4674 * regcache.c (get_thread_regcache_for_ptid): New function.
4676 2014-09-11 Tom Tromey <tromey@redhat.com>
4677 Gary Benson <gbenson@redhat.com>
4679 * symbol.c: New file.
4680 * Makefile.in (SFILES): Add symbol.c.
4681 (OBS): Add symbol.o.
4683 2014-09-11 Gary Benson <gbenson@redhat.com>
4685 * target.c (target_stop_ptid, target_continue_ptid): New
4688 2014-09-11 Tom Tromey <tromey@redhat.com>
4689 Gary Benson <gbenson@redhat.com>
4691 * target.h: Include target/target.h.
4692 * target.c (target_read_memory, target_read_uint32)
4693 (target_write_memory): New functions.
4695 2014-09-11 Gary Benson <gbenson@redhat.com>
4697 * server.h (debug_hw_points): Don't declare.
4698 * server.c (debug_hw_points): Don't define. Replace all uses
4699 with show_debug_regs.
4700 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4701 all uses with show_debug_regs.
4703 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4705 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4706 endianness into account.
4707 (ppc_supply_ptrace_register): Likewise.
4709 2014-09-03 James Hogan <james.hogan@imgtec.com>
4711 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4712 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4714 2014-09-03 Gary Benson <gbenson@redhat.com>
4716 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4717 ALL_DEBUG_ADDRESS_REGISTERS.
4719 2014-09-02 Gary Benson <gbenson@redhat.com>
4721 * i386-low.h: Renamed as...
4722 * x86-low.h: New file. All type, function and variable name
4723 prefixes changed from "i386_" to "x86_". All references updated.
4724 * i386-low.c: Renamed as...
4725 * x86-low.c: New file. All type, function and variable name
4726 prefixes changed from "i386_" to "x86_". All references updated.
4728 2014-09-02 Gary Benson <gbenson@redhat.com>
4730 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4731 (x86_linux_new_thread): Likewise.
4733 2014-08-29 Gary Benson <gbenson@redhat.com>
4735 * server.h (setjmp.h): Do not include.
4736 (toplevel): Do not declare.
4737 (common-exceptions.h): Include.
4738 (cleanups.h): Likewise.
4739 * server.c (toplevel): Do not define.
4740 (exit_code): New static global.
4741 (detach_or_kill_for_exit_cleanup): New function.
4742 (main): New function. Original main renamed to...
4743 (captured_main): New function.
4744 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4746 2014-08-29 Gary Benson <gbenson@redhat.com>
4748 * Makefile.in (SFILES): Add common/common-exceptions.c.
4749 (OBS): Add common-exceptions.o.
4750 (common-exceptions.o): New rule.
4751 * utils.c (prepare_to_throw_exception): New function.
4753 2014-08-29 Gary Benson <gbenson@redhat.com>
4755 * config.in: Regenerate.
4756 * configure: Likewise.
4758 2014-08-29 Gary Benson <gbenson@redhat.com>
4760 * Makefile.in (SFILES): Add common/cleanups.c.
4762 (cleanups.o): New rule.
4764 2014-08-29 Gary Benson <gbenson@redhat.com>
4766 * utils.c (internal_vwarning): New function.
4768 2014-08-28 Gary Benson <gbenson@redhat.com>
4770 * utils.h (fatal): Remove declaration.
4771 * utils.c (fatal): Remove function.
4773 2014-08-28 Gary Benson <gbenson@redhat.com>
4775 * tracepoint.c (gdb_agent_init): Replace fatal with
4777 (initialize_tracepoint): Likewise.
4779 2014-08-28 Gary Benson <gbenson@redhat.com>
4781 * remote-utils.c (remote_prepare): Replace fatal with error.
4783 2014-08-28 Gary Benson <gbenson@redhat.com>
4785 * linux-low.c (linux_async): Replace fatal with warning.
4787 (linux_start_non_stop): Return -1 if linux_async failed.
4789 2014-08-28 Gary Benson <gbenson@redhat.com>
4791 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4793 (i386_dr_low_get_addr): Remove vague comment.
4794 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4797 2014-08-28 Gary Benson <gbenson@redhat.com>
4799 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4800 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4802 (linux_resume_one_lwp): Likewise.
4803 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4805 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4806 with internal_error.
4807 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4808 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4809 (find_register_by_name): Replace fatal with internal_error.
4810 (find_regno): Likewise.
4811 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4812 * thread-db.c (thread_db_create_event): Likewise.
4813 (thread_db_load_search): Likewise.
4814 (try_thread_db_load_1): Likewise.
4815 * tracepoint.c (get_jump_space_head): Replace fatal with
4817 (claim_trampoline_space): Likewise.
4818 (have_fast_tracepoint_trampoline_buffer): Likewise.
4819 (cmd_qtstart): Likewise.
4820 (stop_tracing): Likewise.
4821 (fast_tracepoint_collecting): Likewise.
4822 (target_malloc): Likewise.
4823 (download_tracepoint): Likewise.
4824 (download_trace_state_variables): Replace check with gdb_assert.
4825 (upload_fast_traceframes): Replace fatal with internal_error.
4827 2014-08-19 Tom Tromey <tromey@redhat.com>
4828 Gary Benson <gbenson@redhat.com>
4830 * Makefile.in (SFILES): Add common/common-debug.c.
4831 (OBS): Add common-debug.o.
4832 (common-debug.o): New rule.
4833 * debug.h (debug_printf): Don't declare.
4834 * debug.c (debug_printf): Renamed and rewritten as...
4835 (debug_vprintf): New function.
4837 2014-08-19 Gary Benson <gbenson@redhat.com>
4839 * utils.h: Do not include print-utils.h.
4841 2014-08-19 Tom Tromey <tromey@redhat.com>
4842 Gary Benson <gbenson@redhat.com>
4844 * server.h: Add static assertion.
4845 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4847 2014-08-19 Tom Tromey <tromey@redhat.com>
4848 Gary Benson <gbenson@redhat.com>
4850 * Makefile.in (SFILES): Add common/errors.c.
4851 (OBS): Add errors.o.
4852 (IPA_OBS): Add errors-ipa.o.
4853 (errors.o): New rule.
4854 (errors-ipa.o): Likewise.
4855 * utils.h (perror_with_name, error, warning): Don't declare.
4856 * utils.c (warning): Renamed and rewritten as...
4857 (vwarning): New function.
4858 (error): Renamed and rewritten as...
4859 (verror): New function.
4860 (internal_error): Renamed and rewritten as...
4861 (internal_verror): New function.
4863 2014-08-07 Gary Benson <gbenson@redhat.com>
4865 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4866 * configure: Regenerate.
4867 * config.in: Likewise.
4868 * server.h: Do not include errno.h.
4869 * event-loop.c: Likewise.
4870 * hostio-errno.c: Likewise.
4871 * linux-low.c: Likewise.
4872 * remote-utils.c: Likewise.
4873 * spu-low.c: Likewise.
4874 * utils.c: Likewise.
4875 * gdbreplay.c: Unconditionally include errno.h.
4877 2014-08-07 Gary Benson <gbenson@redhat.com>
4879 * server.h: Do not include string.h.
4880 * event-loop.c: Likewise.
4881 * linux-low.c: Likewise.
4882 * regcache.c: Likewise.
4883 * remote-utils.c: Likewise.
4884 * spu-low.c: Likewise.
4885 * utils.c: Likewise.
4887 2014-08-07 Gary Benson <gbenson@redhat.com>
4889 * server.h: Do not include gdb_assert.h.
4891 2014-08-07 Gary Benson <gbenson@redhat.com>
4893 * server.h: Do not include common-utils.h.
4895 2014-08-07 Gary Benson <gbenson@redhat.com>
4897 * server.h: Do not include ptid.h.
4898 * notif.h: Likewise.
4900 2014-08-07 Gary Benson <gbenson@redhat.com>
4902 * server.h: Do not include gdb_locale.h.
4904 2014-08-07 Gary Benson <gbenson@redhat.com>
4906 * server.h: Do not include gdb/signals.h.
4907 * win32-low.c: Likewise.
4909 2014-08-07 Gary Benson <gbenson@redhat.com>
4911 * server.h: Do not include pathmax.h.
4913 2014-08-07 Gary Benson <gbenson@redhat.com>
4915 * server.h: Do not include libiberty.h.
4916 * linux-bfin-low.c: Likewise.
4918 2014-08-07 Gary Benson <gbenson@redhat.com>
4920 * server.h: Do not include ansidecl.h.
4922 2014-08-07 Gary Benson <gbenson@redhat.com>
4924 * linux-x86-low.c: Do not include stddef.h.
4925 * lynx-ppc-low.c: Likewise.
4926 * tracepoint.c: Likewise.
4928 2014-08-07 Gary Benson <gbenson@redhat.com>
4930 * server.h: Do not include stdarg.h.
4931 * nto-low.c: Likewise.
4933 2014-08-07 Gary Benson <gbenson@redhat.com>
4935 * server.h: Do not include stdlib.h.
4936 * inferiors.c: Likewise.
4937 * linux-low.c: Likewise.
4938 * regcache.c: Likewise.
4939 * spu-low.c: Likewise.
4940 * tracepoint.c: Likewise.
4941 * utils.c: Likewise.
4943 2014-08-07 Gary Benson <gbenson@redhat.com>
4945 * server.h: Do not include stdio.h.
4946 * linux-low.c: Likewise.
4947 * remote-utils.c: Likewise.
4948 * spu-low.c: Likewise.
4949 * utils.c: Likewise.
4950 * wincecompat.c: Likewise.
4952 2014-08-06 Gary Benson <gbenson@redhat.com>
4954 * regcache.c (init_register_cache): Move conditionals inside if.
4956 2014-08-06 Gary Benson <gbenson@redhat.com>
4958 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4960 2014-07-31 Gary Benson <gbenson@redhat.com>
4962 * ax.h: Do not include server.h.
4963 * gdbthread.h: Likewise.
4964 * lynx-low.h: Likewise.
4965 * notif.h: Likewise.
4967 2014-07-30 Gary Benson <gbenson@redhat.com>
4969 * server.h: Include common-defs.h.
4970 Do not include config.h or build-gnulib-gdbserver/config.h.
4972 2014-07-30 Gary Benson <gbenson@redhat.com>
4974 * hostio-errno.c: Move server.h to top of includes list.
4975 * inferiors.c: Likewise.
4976 * linux-x86-low.c: Likewise.
4977 * notif.c: Include server.h.
4979 2014-07-24 Tom Tromey <tromey@redhat.com>
4980 Gary Benson <gbenson@redhat.com>
4982 * server.h (CORE_ADDR): Now unsigned.
4984 2014-07-16 Pedro Alves <palves@redhat.com>
4986 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4988 2014-07-15 Pedro Alves <palves@redhat.com>
4990 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4993 2014-07-11 Pedro Alves <palves@redhat.com>
4995 * linux-low.c (kill_wait_lwp): New function, based on
4996 kill_one_lwp_callback, but use my_waitpid directly.
4997 (kill_one_lwp_callback, linux_kill): Use it.
4999 2014-06-23 Pedro Alves <palves@redhat.com>
5001 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5002 before setting DR0..DR3.
5004 2014-06-20 Gary Benson <gbenson@redhat.com>
5006 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5007 * configure: Regenerated.
5008 * config.in: Likewise.
5010 2014-06-20 Gary Benson <gbenson@redhat.com>
5012 * Makefile.in (SFILES): Update locations for files moved
5014 (object file files): Reordered.
5016 2014-06-20 Gary Benson <gbenson@redhat.com>
5018 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5019 (i386_dr_low_set_addr): Likewise.
5020 (i386_dr_low_get_addr): Likewise.
5021 (i386_dr_low_can_set_control): Likewise.
5022 (i386_dr_low_set_control): Likewise.
5023 (i386_dr_low_get_control): Likewise.
5024 (i386_dr_low_get_status): Likewise.
5025 (i386_get_debug_register_length): Likewise.
5026 * linux-x86-low.c (i386_dr_low_set_addr):
5027 Changed signature. Made static.
5028 (i386_dr_low_get_addr): Likewise.
5029 (i386_dr_low_set_control): Likewise.
5030 (i386_dr_low_get_control): Likewise.
5031 (i386_dr_low_get_status): Likewise.
5032 (i386_dr_low): New global variable.
5033 * win32-i386-low.c (i386_dr_low_set_addr):
5034 Changed signature. Made static.
5035 (i386_dr_low_get_addr): Likewise.
5036 (i386_dr_low_set_control): Likewise.
5037 (i386_dr_low_get_control): Likewise.
5038 (i386_dr_low_get_status): Likewise.
5039 (i386_dr_low): New global variable.
5041 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5043 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5044 * Makefile.in (AR, AR_FLAGS): Define.
5045 * configure: Regenerate.
5047 2014-06-19 Gary Benson <gbenson@redhat.com>
5049 * Makefile.in (i386-dregs.o): New rule.
5050 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5051 * i386-low.c (target.h): Remove include.
5052 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5053 (DR_CONTROL_SHIFT): Likewise.
5054 (DR_CONTROL_SIZE): Likewise.
5055 (DR_RW_EXECUTE): Likewise.
5056 (DR_RW_WRITE): Likewise.
5057 (DR_RW_READ): Likewise.
5058 (DR_RW_IORW): Likewise.
5059 (DR_LEN_1): Likewise.
5060 (DR_LEN_2): Likewise.
5061 (DR_LEN_4): Likewise.
5062 (DR_LEN_8): Likewise.
5063 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5064 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5065 (DR_ENABLE_SIZE): Likewise.
5066 (DR_LOCAL_SLOWDOWN): Likewise.
5067 (DR_GLOBAL_SLOWDOWN): Likewise.
5068 (DR_CONTROL_RESERVED): Likewise.
5069 (I386_DR_CONTROL_MASK): Likewise.
5070 (I386_DR_VACANT): Likewise.
5071 (I386_DR_LOCAL_ENABLE): Likewise.
5072 (I386_DR_GLOBAL_ENABLE): Likewise.
5073 (I386_DR_DISABLE): Likewise.
5074 (I386_DR_SET_RW_LEN): Likewise.
5075 (I386_DR_GET_RW_LEN): Likewise.
5076 (I386_DR_WATCH_HIT): Likewise.
5077 (i386_wp_op_t): Likewise.
5078 (i386_show_dr): Likewise.
5079 (i386_length_and_rw_bits): Likewise.
5080 (i386_insert_aligned_watchpoint): Likewise.
5081 (i386_remove_aligned_watchpoint): Likewise.
5082 (i386_handle_nonaligned_watchpoint): Likewise.
5083 i386_update_inferior_debug_regs(): Likewise.
5084 (i386_dr_insert_watchpoint): Likewise.
5085 (i386_dr_remove_watchpoint): Likewise.
5086 (i386_dr_region_ok_for_watchpoint): Likewise.
5087 (i386_dr_stopped_data_address): Likewise.
5088 (i386_dr_stopped_by_watchpoint): Likewise.
5090 2014-06-19 Gary Benson <gbenson@redhat.com>
5092 * i386-low.c (i386_dr_show): Renamed to
5093 i386_show_dr and made static. All uses updated.
5094 (i386_dr_length_and_rw_bits): Renamed to
5095 i386_length_and_rw_bits and made static.
5097 (i386_dr_insert_aligned_watchpoint): Renamed to
5098 i386_insert_aligned_watchpoint and made static.
5100 (i386_dr_remove_aligned_watchpoint): Renamed to
5101 i386_remove_aligned_watchpoint and made static.
5103 (i386_dr_update_inferior_debug_regs): Renamed to
5104 i386_update_inferior_debug_regs and made static.
5107 2014-06-18 Gary Benson <gbenson@redhat.com>
5109 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5110 (i386_dr_low_can_set_control): Likewise.
5111 (i386_get_debug_register_length): Likewise.
5112 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5113 (i386_dr_low_can_set_control): Likewise.
5114 (i386_get_debug_register_length): Likewise.
5116 2014-06-17 Gary Benson <gbenson@redhat.com>
5118 * i386-low.h (i386-dregs.h): New include.
5119 (DR_FIRSTADDR): Now in i386-dregs.h.
5120 (DR_LASTADDR): Likewise.
5121 (DR_NADDR): Likewise.
5122 (DR_STATUS): Likewise.
5123 (DR_CONTROL): Likewise.
5124 (i386_debug_reg_state): Likewise.
5125 (i386_dr_insert_watchpoint): Likewise.
5126 (i386_dr_remove_watchpoint): Likewise.
5127 (i386_dr_region_ok_for_watchpoint): Likewise.
5128 (i386_dr_stopped_data_address): Likewise.
5129 (i386_dr_stopped_by_watchpoint): Likewise.
5130 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5132 2014-06-18 Gary Benson <gbenson@redhat.com>
5134 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5135 i386_dr_insert_watchpoint.
5136 (i386_low_remove_watchpoint): Renamed to
5137 i386_dr_remove_watchpoint.
5138 (i386_low_region_ok_for_watchpoint): Renamed to
5139 i386_dr_region_ok_for_watchpoint.
5140 (i386_low_stopped_data_address): Renamed to
5141 i386_dr_stopped_data_address.
5142 (i386_low_stopped_by_watchpoint): Renamed to
5143 i386_dr_stopped_by_watchpoint.
5144 * i386-low.c (i386_show_dr): Renamed to
5145 i386_dr_show and made nonstatic. All uses updated.
5146 (i386_length_and_rw_bits): Renamed to
5147 i386_dr_length_and_rw_bits and made nonstatic.
5149 (i386_insert_aligned_watchpoint): Renamed to
5150 i386_dr_insert_aligned_watchpoint and made nonstatic.
5152 (i386_remove_aligned_watchpoint): Renamed to
5153 i386_dr_remove_aligned_watchpoint and made nonstatic.
5155 (i386_update_inferior_debug_regs): Renamed to
5156 i386_dr_update_inferior_debug_regs and made nonstatic.
5158 (i386_low_insert_watchpoint): Renamed to
5159 i386_dr_insert_watchpoint. All uses updated.
5160 (i386_low_remove_watchpoint): Renamed to
5161 i386_dr_remove_watchpoint. All uses updated.
5162 (i386_low_region_ok_for_watchpoint): Renamed to
5163 i386_dr_region_ok_for_watchpoint. All uses updated.
5164 (i386_low_stopped_data_address): Renamed to
5165 i386_dr_stopped_data_address. All uses updated.
5166 (i386_low_stopped_by_watchpoint): Renamed to
5167 i386_dr_stopped_by_watchpoint. All uses updated.
5169 2014-06-18 Gary Benson <gbenson@redhat.com>
5171 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5172 (i386_dr_low_can_set_control): Likewise.
5173 (i386_insert_aligned_watchpoint): New check.
5175 2014-06-18 Gary Benson <gbenson@redhat.com>
5177 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5180 2014-06-18 Gary Benson <gbenson@redhat.com>
5182 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5183 instead of fatal and error.
5184 (i386_handle_nonaligned_watchpoint): Likewise.
5186 2014-06-18 Gary Benson <gbenson@redhat.com>
5188 * i386-low.c (i386_get_debug_register_length): New macro.
5189 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5190 (i386_show_dr): Use debug_printf instead of fprintf. Use
5191 phex to format values.
5193 2014-06-18 Gary Benson <gbenson@redhat.com>
5195 * i386-low.h: Comment changes.
5196 * i386-low.c: Likewise.
5198 2014-06-18 Gary Benson <gbenson@redhat.com>
5200 * i386-low.c: Whitespace changes.
5202 2014-06-12 Tom Tromey <tromey@redhat.com>
5204 * utils.c (freeargv): Remove.
5206 2014-06-12 Tom Tromey <tromey@redhat.com>
5208 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5209 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5210 (parse_debug_format_options): Likewise.
5211 (gdbserver_usage): Likewise.
5212 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5213 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5214 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5216 ($(LIBGNU)): Depend on libiberty.
5217 (all-lib): Recurse into all subdirs.
5218 (install-only): Invoke "install" target in subdirs.
5219 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5221 * configure: Rebuild.
5222 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5223 for vasprintf, vsnprintf, or gettimeofday.
5224 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5227 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5229 * development.sh: Delete.
5230 * Makefile.in (config.status): Adjust dependency on development.sh.
5231 * configure.ac: Adjust development.sh source call.
5232 * configure: Regenerate.
5234 2014-06-02 Pedro Alves <palves@redhat.com>
5236 * ax.c (gdb_free_agent_expr): New function.
5237 * ax.h (gdb_free_agent_expr): New declaration.
5238 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5240 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5242 (clear_breakpoint_conditions_and_commands): New function.
5243 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5244 (clear_breakpoint_conditions_and_commands): New declaration.
5246 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5248 * linux-aarch64-low.c (asm/ptrace.h): Include.
5250 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5252 Fix TLS access for -static -pthread.
5253 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5254 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5255 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5257 2014-05-20 Pedro Alves <palves@redhat.com>
5259 * linux-aarch64-low.c (aarch64_insert_point)
5260 (aarch64_remove_point): No longer check whether the type is
5261 supported here. Adjust to new interface.
5262 (the_low_target): Install aarch64_supports_z_point_type as
5263 supports_z_point_type method.
5264 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5265 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5266 instead of a Z packet char. Adjust.
5267 (arm_supports_z_point_type): New function.
5268 (arm_insert_point, arm_remove_point): Adjust to new interface.
5269 (the_low_target): Install arm_supports_z_point_type.
5270 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5271 (cris_insert_point, cris_remove_point): Adjust to new interface.
5272 Don't check whether the type is supported here.
5273 (the_low_target): Install cris_supports_z_point_type.
5274 * linux-low.c (linux_supports_z_point_type): New function.
5275 (linux_insert_point, linux_remove_point): Adjust to new interface.
5276 * linux-low.h (struct linux_target_ops) <insert_point,
5277 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5278 raw_breakpoint pointer parameter.
5279 <supports_z_point_type>: New method.
5280 * linux-mips-low.c (mips_supports_z_point_type): New function.
5281 (mips_insert_point, mips_remove_point): Adjust to new interface.
5282 Use mips_supports_z_point_type.
5283 (the_low_target): Install mips_supports_z_point_type.
5284 * linux-ppc-low.c (the_low_target): Install NULL as
5285 supports_z_point_type method.
5286 * linux-s390-low.c (the_low_target): Install NULL as
5287 supports_z_point_type method.
5288 * linux-sparc-low.c (the_low_target): Install NULL as
5289 supports_z_point_type method.
5290 * linux-x86-low.c (x86_supports_z_point_type): New function.
5291 (x86_insert_point): Adjust to new insert_point interface. Use
5292 insert_memory_breakpoint. Adjust to new
5293 i386_low_insert_watchpoint interface.
5294 (x86_remove_point): Adjust to remove_point interface. Use
5295 remove_memory_breakpoint. Adjust to new
5296 i386_low_remove_watchpoint interface.
5297 (the_low_target): Install x86_supports_z_point_type.
5298 * lynx-low.c (lynx_target_ops): Install NULL as
5299 supports_z_point_type callback.
5300 * nto-low.c (nto_supports_z_point_type): New.
5301 (nto_insert_point, nto_remove_point): Adjust to new interface.
5302 (nto_target_ops): Install nto_supports_z_point_type.
5303 * mem-break.c: Adjust intro comment.
5304 (struct raw_breakpoint) <raw_type, size>: New fields.
5305 <inserted>: Update comment.
5306 <shlib_disabled>: Delete field.
5307 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5308 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5309 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5310 (raw_bkpt_type_to_target_hw_bp_type): New function.
5311 (find_enabled_raw_code_breakpoint_at): New function.
5312 (find_raw_breakpoint_at): New type and size parameters. Use them.
5313 (insert_memory_breakpoint): New function, based off
5314 set_raw_breakpoint_at.
5315 (remove_memory_breakpoint): New function.
5316 (set_raw_breakpoint_at): Reimplement.
5317 (set_breakpoint): New, based on set_breakpoint_at.
5318 (set_breakpoint_at): Reimplement.
5319 (delete_raw_breakpoint): Go through the_target->remove_point
5320 instead of assuming memory breakpoints.
5321 (find_gdb_breakpoint_at): Delete.
5322 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5323 (find_gdb_breakpoint): New function.
5324 (set_gdb_breakpoint_at): Delete.
5325 (z_type_supported): New function.
5326 (set_gdb_breakpoint_1): New function, loosely based off
5327 set_gdb_breakpoint_at.
5328 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5329 (delete_gdb_breakpoint_at): Delete.
5330 (delete_gdb_breakpoint_1): New function, loosely based off
5331 delete_gdb_breakpoint_at.
5332 (delete_gdb_breakpoint): New function.
5333 (clear_gdb_breakpoint_conditions): Rename to ...
5334 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5336 (add_condition_to_breakpoint): Make static.
5337 (add_breakpoint_condition): Take a struct breakpoint pointer
5338 instead of an address. Adjust.
5339 (gdb_condition_true_at_breakpoint): Rename to ...
5340 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5342 (gdb_condition_true_at_breakpoint): Reimplement.
5343 (add_breakpoint_commands): Take a struct breakpoint pointer
5344 instead of an address. Adjust.
5345 (gdb_no_commands_at_breakpoint): Rename to ...
5346 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5347 parameter. Return true if no breakpoint was found. Change debug
5349 (gdb_no_commands_at_breakpoint): Reimplement.
5350 (run_breakpoint_commands): Rename to ...
5351 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5352 and change return type to boolean.
5353 (run_breakpoint_commands): New function.
5354 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5355 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5356 breakpoint. Go through the_target->remove_point instead of
5357 assuming memory breakpoint.
5358 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5359 software and hardware breakpoints.
5360 (reinsert_raw_breakpoint): Go through the_target->insert_point
5361 instead of assuming memory breakpoint.
5362 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5363 software and hardware breakpoints.
5364 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5365 Check both software and hardware breakpoints.
5366 (validate_inserted_breakpoint): Assert the breakpoint is a
5367 software breakpoint. Set the inserted flag to -1 instead of
5368 setting shlib_disabled.
5369 (delete_disabled_breakpoints): Adjust.
5370 (validate_breakpoints): Only validate software breakpoints.
5371 Adjust to inserted flag change.
5372 (check_mem_read, check_mem_write): Skip breakpoint types other
5373 than software breakpoints. Adjust to inserted flag change.
5374 * mem-break.h (enum raw_bkpt_type): New enum.
5375 (raw_breakpoint, struct process_info): Forward declare.
5376 (Z_packet_to_target_hw_bp_type): Delete declaration.
5377 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5378 (set_gdb_breakpoint, delete_gdb_breakpoint)
5379 (clear_breakpoint_conditions): New declarations.
5380 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5381 (breakpoint_inserted_here): Update comment.
5382 (add_breakpoint_condition, add_breakpoint_commands): Replace
5383 address parameter with a breakpoint pointer parameter.
5384 (gdb_breakpoint_here): Update comment.
5385 (delete_gdb_breakpoint_at): Delete.
5386 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5387 * server.c (process_point_options): Take a struct breakpoint
5388 pointer instead of an address. Adjust.
5389 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5390 delete_gdb_breakpoint.
5391 * spu-low.c (spu_target_ops): Install NULL as
5392 supports_z_point_type method.
5393 * target.h: Include mem-break.h.
5394 (struct target_ops) <prepare_to_access_memory>: Update comment.
5395 <supports_z_point_type>: New field.
5396 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5397 instead of a char. Also take a raw breakpoint pointer.
5398 * win32-arm-low.c (the_low_target): Install NULL as
5399 supports_z_point_type.
5400 * win32-i386-low.c (i386_supports_z_point_type): New function.
5401 (i386_insert_point, i386_remove_point): Adjust to new interface.
5402 (the_low_target): Install i386_supports_z_point_type.
5403 * win32-low.c (win32_supports_z_point_type): New function.
5404 (win32_insert_point, win32_remove_point): Adjust to new interface.
5405 (win32_target_ops): Install win32_supports_z_point_type.
5406 * win32-low.h (struct win32_target_ops):
5407 <supports_z_point_type>: New method.
5408 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5409 instead of a char. Also take a raw breakpoint pointer.
5411 2014-05-20 Pedro Alves <palves@redhat.com>
5413 * mem-break.h: Include break-common.h.
5414 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5415 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5416 (Z_packet_to_target_hw_bp_type): New declaration.
5417 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5418 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5419 (Z_PACKET_ACCESS_WP): Delete macros.
5420 (Z_packet_to_hw_type): Delete function.
5421 * i386-low.h: Don't include break-common.h here.
5422 (Z_packet_to_hw_type): Delete declaration.
5423 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5424 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5425 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5426 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5427 * linux-aarch64-low.c: Don't include break-common.h here.
5428 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5429 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5430 (Z_packet_to_target_hw_bp_type): Delete function.
5431 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5433 (mips_insert_point, mips_remove_point): Use
5434 Z_packet_to_target_hw_bp_type.
5436 2014-05-20 Pedro Alves <palves@redhat.com>
5438 * linux-aarch64-low.c: Include break-common.h.
5439 (enum target_point_type): Delete.
5440 (Z_packet_to_point_type): Rename to ...
5441 (Z_packet_to_target_hw_bp_type): ... this, and return a
5442 target_hw_bp_type instead.
5443 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5444 instead of an enum target_point_type.
5445 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5447 (aarch64_dr_state_insert_one_point)
5448 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5449 (aarch64_handle_aligned_watchpoint)
5450 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5451 Take an enum target_hw_bp_type instead of an enum
5453 (aarch64_supports_z_point_type): New function.
5454 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5455 use Z_packet_to_target_hw_bp_type.
5457 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5459 * configure.ac: Only use -Werror by default when DEVELOPMENT
5461 * configure: Regenerate.
5463 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5465 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5466 * linux-x86-low.c (X86_64_USER_REGS): New.
5467 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5469 2014-04-28 Yao Qi <yao@codesourcery.com>
5471 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5474 2014-04-25 Pedro Alves <palves@redhat.com>
5477 * linux-low.c (linux_attach_fail_reason_string): New function.
5478 (linux_attach_lwp): Delete.
5479 (linux_attach_lwp_1): Rename to ...
5480 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5481 argument. Remove "initial" parameter. Return int instead of
5482 void. Don't error or warn here.
5483 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5484 failure to attach to the tgid. Call warning when failing to
5486 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5487 argument. Remove "initial" parameter. Return int instead of
5488 void. Don't error or warn here.
5489 (linux_attach_fail_reason_string): New declaration.
5490 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5491 interface change. Use linux_attach_fail_reason_string.
5493 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5494 Walfred Tedeschi <walfred.tedeschi@intel.com>
5496 * Makefile.in: Added rules to handle new files
5497 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5498 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5499 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5500 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5501 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5502 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5504 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5505 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5506 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5507 i386/x32-avx512.xml.
5508 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5509 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5510 i386/x32-avx512-linux.xml.
5511 * i387-fp.c (num_avx512_k_registers): New constant for number
5513 (num_avx512_zmmh_low_registers): New constant for number of
5514 lower ZMM registers (0-15).
5515 (num_avx512_zmmh_high_registers): New constant for number of
5516 higher ZMM registers (16-31).
5517 (num_avx512_ymmh_registers): New contant for number of higher
5518 YMM registers (ymm16-31 added by avx521 on x86_64).
5519 (num_avx512_xmm_registers): New constant for number of higher
5520 XMM registers (xmm16-31 added by AVX512 on x86_64).
5521 (struct i387_xsave): Add space for AVX512 registers.
5522 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5523 Add code to handle AVX512 registers.
5524 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5525 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5526 prototypei from generated file.
5527 (tdesc_amd64_avx512_linux): Likewise.
5528 (init_registers_x32_avx512_linux): Likewise.
5529 (tdesc_x32_avx512_linux): Likewise.
5530 (init_registers_i386_avx512_linux): Likewise.
5531 (tdesc_i386_avx512_linux): Likewise.
5532 (x86_64_regmap): Add AVX512 registers.
5533 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5535 (initialize_low_arch): Add code to initialize AVX512 registers.
5537 2014-04-23 Pedro Alves <palves@redhat.com>
5539 * mem-break.c (find_gdb_breakpoint_at): Make static.
5540 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5542 2014-04-23 Pedro Alves <palves@redhat.com>
5544 * i386-low.c: Don't include break-common.h here.
5545 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5546 prototype to take target_hw_bp_type as argument instead of a Z
5548 * i386-low.h: Include break-common.h here.
5549 (Z_packet_to_hw_type): Declare.
5550 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5552 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5553 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5554 (x86_remove_point): Convert the packet number to a
5555 target_hw_bp_type before calling i386_low_remove_watchpoint.
5556 * win32-i386-low.c (i386_insert_point): Convert the packet number
5557 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5558 (i386_remove_point): Convert the packet number to a
5559 target_hw_bp_type before calling i386_low_remove_watchpoint.
5561 2014-04-23 Pedro Alves <palves@redhat.com>
5563 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5565 2014-04-10 Pedro Alves <palves@redhat.com>
5567 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5568 Check if the condition or command is NULL before checking if the
5569 breakpoint is known. On success, return true.
5570 * mem-break.h (add_breakpoint_condition): Document return.
5571 (add_breakpoint_commands): Add describing comment.
5572 * server.c (skip_to_semicolon): New function.
5573 (process_point_options): Use it.
5575 2014-04-09 Pedro Alves <palves@redhat.com>
5577 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5580 2014-02-27 Pedro Alves <palves@redhat.com>
5583 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5585 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5587 (last_thread_of_process_p): Take a PID argument instead of a
5589 (linux_wait_for_lwp): Delete.
5590 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5592 (linux_low_filter_event): New function, party factored out from
5593 linux_wait_for_event.
5594 (linux_wait_for_event): Rename to ...
5595 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5596 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5597 sigsuspend. Check for zombie leaders.
5598 (linux_wait_for_event): Reimplement as wrapper around
5599 linux_wait_for_event_filtered.
5600 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5601 a normal or signal exit is seen, it's the whole process exiting.
5602 (wait_for_sigstop): No longer a for_each_inferior callback.
5603 Rewrite on top of linux_wait_for_event_filtered.
5604 (stop_all_lwps): Call wait_for_sigstop directly.
5605 * server.c (resume, handle_target_event): Handle
5606 TARGET_WAITKIND_NO_RESUMED.
5608 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5610 * win32-low.c (psapi_get_dll_name,
5611 * win32_CreateToolhelp32Snapshot): Delete.
5612 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5613 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5615 (handle_load_dll): Add function description.
5616 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5618 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5620 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5622 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5623 base address when calling win32_add_one_solib.
5624 (handle_load_dll): Delete local variable load_addr.
5625 Remove 0x1000 offset applied to DLL base address when calling
5626 win32_add_one_solib.
5627 (handle_unload_dll): Add comment.
5629 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5631 * win32-low.c (win32_add_all_dlls): Renames
5632 win32_ensure_ntdll_loaded. Rewrite function documentation.
5633 Adjust implementation to always load all DLLs.
5634 Add 0x1000 offset to DLL base address when calling
5635 win32_add_one_solib.
5636 (child_initialization_done): New static global.
5637 (do_initial_child_stuff): Set child_initialization_done to
5638 zero during child initialization, and 1 after. Replace call
5639 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5641 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5642 (handle_unload_dll): Add function documentation.
5643 (get_child_debug_event): Ignore load and unload DLL events
5644 during child initialization.
5646 2014-02-20 Doug Evans <dje@google.com>
5648 Remove global all_lwps.
5649 * inferiors.h (ptid_of): Move here from linux-low.h.
5650 (pid_of, lwpid_of): Ditto.
5651 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5652 parameter is a struct thread_info * now.
5653 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5654 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5655 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5657 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5658 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5659 * linux-arm-low.c (update_registers_callback): Update, "entry"
5660 parameter is a struct thread_info * now.
5661 Fetch lwpid from current_inferior directly.
5662 (arm_insert_point): Pass &all_threads to find_inferior instead of
5664 (arm_remove_point): Ditto.
5665 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5666 (arm_prepare_to_resume): Fetch pid from thread.
5667 (arm_read_description): Fetch lwpid from current_inferior directly.
5668 * linux-low.c (all_lwps): Delete.
5669 (delete_lwp): Delete call to remove_inferior.
5670 (handle_extended_wait): Fetch lwpid from thread.
5671 (add_lwp): Don't set lwp->entry.id. Remove call to
5672 add_inferior_to_list.
5673 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5674 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5675 (kill_one_lwp_callback): Ditto.
5676 (linux_kill): Don't dereference NULL pointer.
5677 Fetch ptid,lwpid from thread.
5678 (get_detach_signal): Fetch ptid from thread.
5679 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5680 Simplify call to regcache_invalidate_thread.
5681 (delete_lwp_callback): Update, "entry" parameter is a
5682 struct thread_info * now. Fetch pid from thread.
5683 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5684 (status_pending_p_callback): Update, "entry" parameter is a
5685 struct thread_info * now. Fetch ptid from thread.
5686 (find_lwp_pid): Update, "entry" parameter is a
5687 struct thread_info * now.
5688 (linux_wait_for_lwp): Fetch pid from thread.
5689 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5690 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5691 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5692 (dequeue_one_deferred_signal): Ditto.
5693 (cancel_breakpoint): Fetch ptid from current_inferior.
5694 (linux_wait_for_event): Pass &all_threads to find_inferior,
5695 not &all_lwps. Fetch ptid, lwpid from thread.
5696 (count_events_callback): Update, "entry" parameter is a
5697 struct thread_info * now.
5698 (select_singlestep_lwp_callback): Ditto.
5699 (select_event_lwp_callback): Ditto.
5700 (cancel_breakpoints_callback): Ditto.
5701 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5703 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5704 (unsuspend_one_lwp): Update, "entry" parameter is a
5705 struct thread_info * now.
5706 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5708 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5709 Fetch lwpid from thread, not lwp.
5710 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5711 Pass &all_threads to find_inferior, not &all_lwps.
5712 (send_sigstop): Fetch lwpid from thread, not lwp.
5713 (send_sigstop_callback): Update, "entry" parameter is a
5714 struct thread_info * now.
5715 (suspend_and_send_sigstop_callback): Ditto.
5716 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5717 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5718 struct thread_info * now.
5719 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5721 (lwp_running): Update, "entry" parameter is a
5722 struct thread_info * now.
5723 (stop_all_lwps): Fetch ptid from thread.
5724 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5725 (linux_resume_one_lwp): Fetch lwpid from thread.
5726 (linux_set_resume_request): Update, "entry" parameter is a
5727 struct thread_info * now. Fetch pid, lwpid from thread.
5728 (resume_status_pending_p): Update, "entry" parameter is a
5729 struct thread_info * now.
5730 (need_step_over_p): Ditto. Fetch lwpid from thread.
5731 (start_step_over): Fetch lwpid from thread.
5732 (linux_resume_one_thread): Update, "entry" parameter is a
5733 struct thread_info * now. Fetch lwpid from thread.
5734 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5735 (proceed_one_lwp): Update, "entry" parameter is a
5736 struct thread_info * now. Fetch lwpid from thread.
5737 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5738 struct thread_info * now.
5739 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5740 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5741 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5743 (regsets_store_inferior_registers): Ditto.
5744 (fetch_register, store_register): Ditto.
5745 (linux_read_memory, linux_write_memory): Ditto.
5746 (linux_request_interrupt): Ditto.
5747 (linux_read_auxv): Ditto.
5748 (linux_xfer_siginfo): Ditto.
5749 (linux_qxfer_spu): Ditto.
5750 (linux_qxfer_libraries_svr4): Ditto.
5751 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5752 moved to inferiors.h.
5754 (get_thread_lwp): Update.
5755 (struct lwp_info): Delete member "entry". Simplify comment for
5758 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5759 current_inferior directly.
5760 (update_watch_registers_callback): Update, "entry" parameter is a
5761 struct thread_info * now. Fetch pid from thread.
5762 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5763 (mips_insert_point): Fetch lwpid from current_inferior.
5764 Pass &all_threads to find_inferior, not &all_lwps.
5765 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5766 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5768 (mips_stopped_data_address): Ditto.
5769 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5771 * linux-tile-low.c (tile_arch_setup): Ditto.
5772 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5773 (update_debug_registers_callback): Update, "entry" parameter is a
5774 struct thread_info * now. Fetch pid from thread.
5775 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5776 Pass &all_threads to find_inferior, not &all_lwps.
5777 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5778 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5779 Pass &all_threads to find_inferior, not &all_lwps.
5780 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5781 (i386_dr_low_get_status): Ditto.
5782 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5783 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5784 (x86_linux_read_description): Ditto.
5785 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5787 2014-02-20 Doug Evans <dje@google.com>
5789 * inferiors.c (get_first_inferior): Fix buglet.
5791 2014-02-19 Doug Evans <dje@google.com>
5793 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5794 * inferiors.c (add_thread): Change result type to struct thread_info *.
5795 All callers updated.
5796 (add_lwp): Call add_thread here instead of in callers.
5797 All callers updated.
5798 * linux-low.h (get_lwp_thread): Rewrite.
5799 (struct lwp_info): New member "thread".
5801 2014-02-19 Doug Evans <dje@google.com>
5803 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5804 All callers updated.
5806 2014-02-19 Doug Evans <dje@google.com>
5808 * inferiors.c (add_thread): Fix whitespace.
5810 2014-02-19 Doug Evans <dje@google.com>
5812 * dll.c (clear_dlls): Replace accessing list implemention details
5814 * gdbthread.h (get_first_thread): Declare.
5815 * inferiors.c (for_each_inferior_with_data): New function.
5816 (get_first_thread): New function.
5817 (find_thread_ptid): Simplify.
5818 (get_first_inferior): New function.
5819 (clear_list): Delete.
5820 (one_inferior_p): New function.
5821 (clear_inferior_list): New function.
5822 (clear_inferiors): Update.
5823 * inferiors.h (for_each_inferior_with_data): Declare.
5824 (clear_inferior_list): Declare.
5825 (one_inferior_p): Declare.
5826 (get_first_inferior): Declare.
5827 * linux-low.c (linux_wait_for_event): Replace accessing list
5828 implemention details with API function.
5829 * server.c (target_running): Ditto.
5830 (accumulate_file_name_length): New function.
5831 (emit_dll_description): New function.
5832 (handle_qxfer_libraries): Replace accessing list implemention
5833 details with API function.
5834 (handle_qxfer_threads_worker): New function.
5835 (handle_qxfer_threads_proper): Replace accessing list implemention
5836 details with API function.
5837 (handle_query): Ditto.
5838 (visit_actioned_threads_callback_ftype): New typedef.
5839 (visit_actioned_threads_data): New struct.
5840 (visit_actioned_threads): Rewrite to be find_inferior callback.
5841 (resume): Call find_inferior.
5842 (handle_status): Replace accessing list implemention
5843 details with API function.
5844 (process_serial_event): Replace accessing list implemention details
5846 * target.c (set_desired_inferior): Replace accessing list implemention
5847 details with API function.
5848 * tracepoint.c (same_process_p): New function.
5849 (gdb_agent_about_to_close): Replace accessing list implemention
5850 details with API function.
5851 * win32-low.c (child_delete_thread): Replace accessing list
5852 implemention details with API function.
5853 (match_dll_by_basename): New function.
5854 (dll_is_loaded_by_basename): New function.
5855 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5856 details call to dll_is_loaded_by_basename.
5858 2014-02-19 Doug Evans <dje@google.com>
5860 * dll.h (struct dll_info): Add comment.
5861 * gdbthread.h (struct thread_info): Add comment.
5862 (current_ptid): Simplify.
5863 * inferiors.c (add_process): Update.
5864 (remove_process): Update.
5865 * inferiors.h (struct process_info): Rename member "head" to "entry".
5866 * linux-low.c (delete_lwp): Update.
5868 (last_thread_of_process_p): Update.
5869 (kill_one_lwp_callback, linux_kill): Update.
5870 (status_pending_p_callback): Update.
5871 (wait_for_sigstop): Update. Simplify read of ptid.
5872 (start_step_over): Update.
5873 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5874 (get_lwp_thread): Update.
5875 (struct lwp_info): Rename member "head" to "entry".
5876 * regcache.h (inferior_list_entry): Delete.
5877 * server.c (kill_inferior_callback): Update.
5878 (detach_or_kill_inferior_callback): Update.
5879 (print_started_pid): Update.
5880 (print_attached_pid): Update.
5881 (process_serial_event): Simplify read of ptid.
5882 * thread-db.c (thread_db_create_event): Update.
5883 (thread_db_get_tls_address): Update.
5884 * win32-low.c (current_inferior_ptid): Simplify.
5886 2014-02-19 Tom Tromey <tromey@redhat.com>
5888 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5890 (target_supports_btrace): Update.
5892 2014-02-14 Yao Qi <yao@codesourcery.com>
5894 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5895 (rsp-low-ipa.o): New target.
5897 2014-02-12 Tom Tromey <tromey@redhat.com>
5899 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5900 convert_ascii_to_int.
5901 * regcache.c (registers_to_string): Likewise.
5902 * remote-utils.c (decode_M_packet): Likewise.
5903 * server.c (process_serial_event): Likewise.
5905 2014-02-12 Tom Tromey <tromey@redhat.com>
5907 * server.c (handle_query, handle_v_run): Use hex2bin, not
5909 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5911 2014-02-12 Tom Tromey <tromey@redhat.com>
5913 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5914 convert_int_to_ascii.
5915 * regcache.c (registers_to_string, collect_register_as_string):
5917 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5919 * server.c (process_serial_event): Likewise.
5920 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5921 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5923 2014-02-12 Tom Tromey <tromey@redhat.com>
5925 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5926 bin2hex, not hexify.
5927 * tracepoint.c (cmd_qtstatus): Likewise.
5929 2014-02-12 Tom Tromey <tromey@redhat.com>
5931 * remote-utils.c (monitor_output): Pass explicit length to
5934 2014-02-12 Tom Tromey <tromey@redhat.com>
5936 * tracepoint.c: Include rsp-low.h.
5937 * server.c: Include rsp-low.h.
5938 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5939 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5941 * remote-utils.c: Include rsp-low.h.
5942 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5943 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5944 (convert_int_to_ascii, convert_ascii_to_int): Move to
5946 * regcache.c: Include rsp-low.h.
5947 * ax.c: Include rsp-low.h.
5948 * Makefile.in (SFILES): Add common/rsp-low.c.
5949 (OBS): Add rsp-low.o.
5950 (rsp-low.o): New target.
5952 2014-02-12 Tom Tromey <tromey@redhat.com>
5954 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5955 Include print-utils.h.
5956 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5957 (plongest, thirty_two, phex_nz): Remove.
5958 * Makefile.in (SFILES): Add common/print-utils.c.
5959 (OBS): Add print-utils.o.
5960 (print-utils-ipa.o): New target.
5961 (print-utils.o): New target.
5962 (IPA_OBJS): Add print-utils-ipa.o.
5964 2014-02-06 Tom Tromey <tromey@redhat.com>
5966 * Makefile.in (SFILES): Fix indentation.
5968 2014-02-05 Doug Evans <dje@google.com>
5970 * linux-low.c (linux_wait_for_event): Improve comment.
5971 (linux_wait_1): Keep current_inferior in sync with event_child.
5973 2014-01-22 Doug Evans <dje@google.com>
5975 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5977 2014-01-22 Doug Evans <dje@google.com>
5979 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5980 * configure: Regenerate.
5981 * config.in: Regenerate.
5982 * Makefile.in (SFILES): Add debug.c.
5984 * debug.c: New file.
5985 * debug.h: New file.
5986 * linux-aarch64-low.c (*): Update all debugging printfs to use
5987 debug_printf instead of fprintf.
5988 * linux-arm-low.c (*): Ditto.
5989 * linux-cris-low.c (*): Ditto.
5990 * linux-crisv32-low.c (*): Ditto.
5991 * linux-m32r-low.c (*): Ditto.
5992 * linux-sparc-low.c (*): Ditto.
5993 * linux-x86.c (*): Ditto.
5994 * linux-low.c (*): Ditto.
5995 (linux_wait_1): Add calls to debug_enter, debug_exit.
5996 (linux_wait): Remove redundant debugging printf.
5997 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5998 (linux_resume, unstop_all_lwps): Ditto.
5999 * mem-break.c (*): Update all debugging printfs to use
6000 debug_printf instead of fprintf.
6001 * remote-utils.c (*): Ditto.
6002 * thread-db.c (*): Ditto.
6003 * server.c #include <ctype.h>, "gdb_vecs.h".
6004 (debug_threads): Moved to debug.c.
6005 (*): Update all debugging printfs to use debug_printf instead of
6007 (start_inferior): Replace call to fflush with call to debug_flush.
6008 (monitor_show_help): Mention set debug-format.
6009 (parse_debug_format_options): New function.
6010 (handle_monitor_command): Handle "monitor set debug-format".
6011 (gdbserver_usage): Mention --debug-format.
6012 (main): Parse --debug-format.
6013 * server.h (debug_threads): Declaration moved to debug.h.
6015 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6016 trace_debug_1 that uses debug_printf.
6017 (tracepoint_look_up_symbols): Update all debugging printfs to use
6018 debug_printf instead of fprintf.
6020 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6022 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6025 2014-01-17 Pedro Alves <palves@redhat.com>
6028 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6029 defined after including gdb_proc_service.h.
6031 2014-01-16 Doug Evans <dje@google.com>
6033 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6034 (match_dll): Use it.
6036 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6038 * target.h (target_ops) <read_btrace>: Change parameters and
6039 return type to allow error reporting.
6040 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6041 trace reading errors on.
6042 * linux-low.c (linux_low_read_btrace): Pass trace reading
6044 (linux_low_disable_btrace): New.
6046 2014-01-15 Doug Evans <dje@google.com>
6048 * inferiors.c (thread_id_to_gdb_id): Delete.
6049 * inferiors.h (thread_id_to_gdb_id): Delete.
6051 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6053 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6054 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6057 2014-01-08 Pedro Alves <palves@redhat.com>
6059 * server.c (handle_status): Don't discard previous queued stop
6060 replies or thread's pending status here.
6061 (main) <disconnection>: Do it here instead.
6063 2014-01-08 Pedro Alves <palves@redhat.com>
6065 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6066 * server.c (visit_actioned_threads, handle_pending_status): New
6068 (handle_v_cont): Factor out parts to ...
6069 (resume): ... this new function. If in all-stop, and a thread
6070 being resumed has a pending status, report it without actually
6072 (myresume): Adjust to use the new 'resume' function.
6073 (clear_pending_status_callback, set_pending_status_callback)
6074 (find_status_pending_thread_callback): New functions.
6075 (handle_status): Handle the case of multiple threads having
6076 interesting statuses to report. Report threads' real last signal
6077 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6078 with an interesting thread to report the status for, instead of
6079 always reporting the status of the first thread.
6081 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6083 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6084 * gdbreplay.c (gdbreplay_version): Likewise.
6086 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6088 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6089 iov.iov_len with the real length in use.
6091 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6093 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6094 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6095 for all targets that use win32-low.c.
6096 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6097 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6099 2013-12-13 Pedro Alves <palves@redhat.com>
6101 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6102 if equal to TARGET_WAITKIND_LOADED.
6103 * win32-low.c (cached_status): New static global.
6104 (win32_wait): Add declaration.
6105 (do_initial_child_stuff): Flush all initial pending debug events
6106 up to the initial breakpoint.
6107 (win32_wait): If CACHED_STATUS was set, return that instead
6108 of doing a real wait. Remove the code resuming the execution
6109 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6110 during the initial phase. Also remove the code changing
6111 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6112 TARGET_WAITKIND_STOPPED.
6114 2013-12-11 Yao Qi <yao@codesourcery.com>
6116 * notif.c (handle_notif_ack): Return 0 if no notification
6119 2013-11-20 Doug Evans <dje@google.com>
6121 * linux-low.c (linux_set_resume_request): Fix comment.
6123 2013-11-20 Doug Evans <dje@google.com>
6125 * linux-low.c (resume_status_pending_p): Tweak comment.
6127 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6129 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6130 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6131 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6132 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6133 (srv_amd64_regobj): Add amd64-mpx.o.
6134 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6135 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6136 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6137 * i387-fp.c (num_pl_bnd_register) Added constant.
6138 (num_pl_bnd_cfg_registers) Added constant.
6139 (struct i387_xsave) Added reserved area and MPX fields.
6140 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6141 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6143 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6144 (init_registers_amd64_mpx_linux): Declare new function.
6145 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6146 (x86_64_regmap): Add MPX registers.
6147 (x86_linux_read_description): Add MPX case.
6148 (initialize_low_arch): Initialize MPX targets.
6150 2013-11-18 Tom Tromey <tromey@redhat.com>
6152 * configure: Rebuild.
6153 * configure.ac: Don't check for stdlib.h.
6154 * gdbreplay.c: Unconditionally include stdlib.h.
6156 2013-11-18 Tom Tromey <tromey@redhat.com>
6158 * config.in: Rebuild.
6159 * configure: Rebuild.
6160 * configure.ac: Don't use AC_HEADER_DIRENT.
6162 2013-11-18 Tom Tromey <tromey@redhat.com>
6164 * server.h: Don't check HAVE_STRING_H.
6165 * gdbreplay.c: Don't check HAVE_STRING_H.
6166 * configure: Rebuild.
6168 2013-11-18 Tom Tromey <tromey@redhat.com>
6170 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6173 2013-11-08 Tom Tromey <tromey@redhat.com>
6175 * configure, config.in: Rebuild.
6176 * configure.ac: Remove unused configury.
6178 2013-11-08 Tom Tromey <tromey@redhat.com>
6180 * acinclude.m4: Include common.m4, codeset.m4.
6181 * configure, config.in: Rebuild.
6182 * configure.ac: Use GDB_AC_COMMON.
6184 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6186 * linux-s390-low.c (HWCAP_S390_TE): New define.
6187 (s390_arch_setup): Consider the TE field in the HWCAP for
6188 determining 'have_regset_tdb'.
6190 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6193 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6196 2013-10-02 Pedro Alves <palves@redhat.com>
6198 * server.c (process_serial_event): Don't output "GDBserver
6199 exiting" if GDB is connected through stdio.
6200 * target.c (mywait): Likewise, be silent if GDB is connected
6203 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6205 * lynx-low.c (lynx_add_threads_after_attach): New function.
6206 (lynx_attach): Remove call to add_thread. Add call to
6207 lynx_add_threads_after_attach instead.
6209 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6211 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6212 * config.in, configure: Regenerated.
6214 2013-09-18 Yao Qi <yao@codesourcery.com>
6217 * server.c (start_inferior): Clear 'resume_info'.
6219 2013-09-16 Jiong Wang <jiwang@tilera.com>
6221 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6224 2013-09-16 Jiong Wang <jiwang@tilera.com>
6226 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6227 linux-tile-low.o to srv_tgtobj.
6229 2013-09-16 Will Newton <will.newton@linaro.org>
6231 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6234 2013-09-06 Pedro Alves <palves@redhat.com>
6236 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6237 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6238 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6239 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6240 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6241 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6243 2013-09-06 Pedro Alves <palves@redhat.com>
6245 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6246 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6248 2013-09-06 Pedro Alves <palves@redhat.com>
6250 * linux-amd64-ipa.c: Include tracepoint.h.
6251 * linux-i386-ipa.c: Include tracepoint.h.
6253 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6255 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6256 (ps_get_thread_area): New function.
6258 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6260 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6261 (initialize_low_arch): Call init_registers_crisv32 rather than
6262 init_register_crisv32.
6264 2013-09-05 Pedro Alves <palves@redhat.com>
6266 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6268 * hostio.h: ... this new file.
6269 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6270 win32-low.c: Include hostio.h.
6272 2013-09-05 Pedro Alves <palves@redhat.com>
6274 * server.h (gdb_client_data, handler_func, callback_handler_func)
6275 (delete_file_handler, add_file_handler, append_callback_event)
6276 (delete_callback_event, start_event_loop, initialize_event_loop):
6277 Move to event-loop.h and include it.
6278 * event-loop.h: New file.
6280 2013-09-05 Pedro Alves <palves@redhat.com>
6282 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6283 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6284 (loaded_dll, unloaded_dll): Move to ...
6285 * dll.h: ... this new file.
6286 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6288 2013-09-05 Pedro Alves <palves@redhat.com>
6290 * server.h (current_process, get_thread_process, all_processes)
6291 (add_inferior_to_list, for_each_inferior, current_inferior)
6292 (remove_inferior, add_process, remove_process, find_process_pid)
6293 (have_started_inferiors_p, have_attached_inferiors_p)
6294 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6295 (clear_inferiors, find_inferior, find_inferior_id)
6296 (inferior_target_data, set_inferior_target_data)
6297 (inferior_regcache_data, set_inferior_regcache_data): Move to
6298 inferiors.h, and include it.
6299 * inferiors.h: New file.
6301 2013-09-05 Pedro Alves <palves@redhat.com>
6303 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6307 2013-09-05 Pedro Alves <palves@redhat.com>
6309 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6311 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6312 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6313 (handle_tracepoint_general_set, handle_tracepoint_query)
6314 (tracepoint_finished_step, tracepoint_was_hit)
6315 (release_while_stepping_state_list, current_traceframe)
6316 (in_readonly_region, traceframe_read_mem)
6317 (fetch_traceframe_registers, traceframe_read_sdata)
6318 (traceframe_read_info, struct fast_tpoint_collect_status)
6319 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6320 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6321 (supply_fast_tracepoint_registers)
6322 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6323 (ipa_tdesc, claim_trampoline_space)
6324 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6325 (agent_mem_read, agent_get_trace_state_variable_value)
6326 (agent_set_trace_state_variable_value, agent_tsv_read)
6327 (agent_mem_read_string, get_raw_reg_func_addr)
6328 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6329 * tracepoint.h: ... this new file.
6331 2013-09-05 Pedro Alves <palves@redhat.com>
6333 * server.h (perror_with_name, error, fatal, warning, paddress)
6334 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6336 * utils.h: New file.
6338 2013-09-05 Pedro Alves <palves@redhat.com>
6340 * server.h (remote_debug, noack_mode, transport_is_reliable)
6341 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6342 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6343 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6344 (write_enn, initialize_async_io, enable_async_io)
6345 (disable_async_io, check_remote_input_interrupt_request)
6346 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6347 (dead_thread_notify, prepare_resume_reply)
6348 (decode_address_to_semicolon, decode_address, decode_m_packet)
6349 (decode_M_packet, decode_X_packet, decode_xfer_write)
6350 (decode_search_memory_packet, unhexify, hexify)
6351 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6352 (look_up_one_symbol, relocate_instruction)
6353 (monitor_output): Move to remote-utils.h, and include it.
6354 * remote-utils.h: New file.
6356 2013-09-05 Pedro Alves <palves@redhat.com>
6358 * server.h (_): Delete.
6360 2013-09-02 Pedro Alves <palves@redhat.com>
6362 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6363 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6365 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6367 2013-09-02 Pierre Muller <muller@sourceware.org>
6369 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6370 or WriteProcessMemory complete successfully and handle
6371 ERROR_PARTIAL_COPY error.
6373 2013-09-02 Pedro Alves <palves@redhat.com>
6375 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6376 error instead of EIO.
6378 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6381 * linux-low.c: Include filestuff.h.
6382 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6383 * lynx-low.c: Include filestuff.h.
6384 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6385 * server.c: Include filestuff.h.
6386 (main): Call notice_open_fds.
6387 * spu-low.c: Include filestuff.h.
6388 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6390 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6392 * Makefile.in: Explain why ../target and ../nat are not
6393 listed as include file search paths.
6394 (linux-waitpid.o): New object file rule.
6395 * configure.srv (srv_native_linux_obj): New variable.
6396 Replace all occurrences of linux native object files with
6397 $srv_native_linux_obj.
6398 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6399 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6400 (linux_enable_event_reporting): Remove declaration.
6401 (my_waitpid): Moved to common/linux-waitpid.c.
6402 (linux_wait_for_event): Pass ptid when calling
6403 linux_enable_event_reporting.
6404 (linux_supports_tracefork_flag): Remove.
6405 (linux_enable_event_reporting): Likewise.
6406 (linux_tracefork_grandchild): Remove.
6407 (STACK_SIZE): Moved to common/linux-ptrace.c.
6408 (linux_tracefork_child): Remove.
6409 (linux_test_for_tracefork): Remove.
6410 (linux_look_up_symbols): Call linux_supports_traceclone.
6411 (initialize_low): Remove call to linux_test_for_tracefork.
6412 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6413 common/linux-ptrace.h.
6414 (PTRACE_TYPE_ARG4): Likewise.
6415 Include linux-ptrace.h.
6417 2013-08-21 Pedro Alves <palves@redhat.com>
6419 * config.in: Renegerate.
6421 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6423 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6424 (SFILES): Remove $(srcdir)/common/target-common.c and
6425 add $(srcdir)/target/waitstatus.c.
6426 (OBS): Remove target-common.o and add waitstatus.o.
6427 (server_h): Remove $(srcdir)/../common/target-common.h and
6428 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6429 and $(srcdir)/../target/waitstatus.h.
6430 (target-common.o): Remove.
6431 (waitstatus.o): New target object file.
6432 * target.h: Do not include target-common.h and
6433 include target/resume.h, target/wait.h and
6434 target/waitstatus.h.
6436 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6438 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6439 to PTRACE_TYPE_ARG3.
6440 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6441 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6443 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6444 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6446 2013-07-27 Jie Zhang <jie@codesourcery.com>
6447 Daniel Jacobowitz <dan@codesourcery.com>
6448 Yao Qi <yao@codesourcery.com>
6450 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6451 (mips-linux-watch.o): New rule.
6452 (mips_linux_watch_h): New variable.
6453 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6455 * linux-mips-low.c: Include mips-linux-watch.h.
6456 (struct arch_process_info, struct arch_lwp_info): New.
6457 (update_watch_registers_callback): New function.
6458 (mips_linux_new_process, mips_linux_new_thread) New functions.
6459 (mips_linux_prepare_to_resume, mips_insert_point): New
6461 (mips_remove_point, mips_stopped_by_watchpoint): New
6463 (rsp_bp_type_to_target_hw_bp_type): New function.
6464 (mips_stopped_data_address): New function.
6465 (the_low_target): Add watchpoint support functions.
6467 2013-07-27 Yao Qi <yao@codesourcery.com>
6469 * i386-low.c: Include break-common.h.
6470 (enum target_hw_bp_type): Remove.
6472 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6474 * Makefile.in (SFILES): /common/target-common.c.
6475 (OBS): Add target-common.o.
6476 (server_h): Add $(srcdir)/../common/target-common.h.
6477 (target-common.o): New target.
6478 * server.c (queue_stop_reply_callback): Free
6479 status string after use.
6480 * target.c (target_waitstatus_to_string): Remove.
6481 * target.h: Include target-common.h.
6482 (resume_kind): Likewise.
6483 (target_waitkind): Likewise.
6484 (target_waitstatus): Likewise.
6485 (TARGET_WNOHANG): Likewise.
6487 2013-07-04 Yao Qi <yao@codesourcery.com>
6489 * Makefile.in (host_alias): Use @host_noncanonical@.
6490 (target_alias): Use @target_noncanonical@.
6491 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6492 ACX_NONCANONICAL_HOST.
6493 * configure: Regenerated.
6496 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6498 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6499 * configure: Rebuild.
6500 * Makefile.in (version_host, version_target): Get from configure.
6501 (version.c): Use $(version_host) and $(version_target).
6503 2013-07-03 Pedro Alves <palves@redhat.com>
6505 * Makefile.in (config.status): Depend on development.sh.
6506 * acinclude.m4: Include libmcheck.m4.
6507 * configure: Regenerate.
6509 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6511 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6512 attribute inside the parentheses.
6513 (winapi_DebugSetProcessKillOnExit): Ditto.
6514 (winapi_DebugBreakProcess): Ditto.
6515 (winapi_GenerateConsoleCtrlEvent): Ditto.
6517 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6519 * notif.h (notif_event): Add a dummy member to avoid compiler
6522 2013-07-01 Pedro Alves <palves@redhat.com>
6524 * hostio.c (HOSTIO_PATH_MAX): Define.
6525 (require_filename, handle_open, handle_unlink, handle_readlink):
6528 2013-07-01 Pedro Alves <palves@redhat.com>
6530 * server.h: Include "pathmax.h".
6531 * linux-low.c: Don't include sys/param.h.
6532 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6534 * win32-low.c: Don't include sys/param.h.
6535 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6537 2013-07-01 Pedro Alves <palves@redhat.com>
6539 * event-loop.c: Don't check HAVE_UNISTD_H before including
6541 * gdbreplay.c: Likewise.
6542 * remote-utils.c: Likewise.
6543 * server.c: Likewise.
6544 * configure.ac: Don't check for unistd.h.
6545 * configure: Regenerate.
6547 2013-06-28 Tom Tromey <tromey@redhat.com>
6549 * Makefile.in (version.c): Use version.in, not
6552 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6554 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6555 * configure: Rebuild.
6556 * Makefile.in (version_host, version_target): Get from configure.
6557 (version.c): Use $(version_host) and $(version_target).
6559 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6561 Fix trace-status to output user name without trailing colon.
6562 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6564 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6566 Fix trace-status to output proper start-time and stop-time.
6567 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6568 output start time and stop time in hex as gdb expects.
6570 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6572 * tracepoint.c (build_traceframe_info_xml): Output trace state
6573 variables present in the trace buffer.
6575 2013-06-24 Tom Tromey <tromey@redhat.com>
6577 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6579 (version.o): Remove.
6580 * gdbreplay.c: Include version.h.
6581 (version, host_name): Don't declare.
6582 * server.h: Include version.h.
6583 (version, host_name): Don't declare.
6585 2013-06-12 Pedro Alves <palves@redhat.com>
6587 * linux-x86-low.c (linux_is_elf64): Delete global.
6588 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6589 with local linux_pid_exe_is_elf_64_file use.
6591 2013-06-11 Pedro Alves <palves@redhat.com>
6593 * linux-low.c (regset_disabled, disable_regset): New functions.
6594 (regsets_fetch_inferior_registers)
6595 (regsets_store_inferior_registers): Use them.
6596 (initialize_regsets_info); Don't allocate the disabled_regsets
6598 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6601 2013-06-11 Pedro Alves <palves@redhat.com>
6603 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6606 2013-06-11 Pedro Alves <palves@redhat.com>
6608 * linux-x86-low.c (initialize_low_arch): Call
6609 init_registers_x32_avx_linux.
6611 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6613 Fix compatibility with Android Bionic.
6614 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6617 2013-06-07 Pedro Alves <palves@redhat.com>
6620 * Makefile.in (OBS): Add tdesc.o.
6621 (IPA_OBJS): Add tdesc-ipa.o.
6622 (tdesc-ipa.o): New rule.
6623 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6625 * linux-low.c (new_inferior): Delete.
6626 (disabled_regsets, num_regsets): Delete.
6627 (linux_add_process): Adjust to set the new per-process
6629 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6630 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6631 was a stop. When calling arch_setup, switch the current inferior
6632 to the thread that got an event.
6633 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6634 (regsets_fetch_inferior_registers)
6635 (regsets_store_inferior_registers): New regsets_info parameter.
6637 (linux_register_in_regsets): New regs_info parameter. Adjust to
6639 (register_addr, fetch_register, store_register): New usrregs_info
6640 parameter. Adjust to use it.
6641 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6642 parameter regs_info. Adjust to use it.
6643 (linux_fetch_registers): Get the current inferior's regs_info, and
6645 (linux_store_registers): Ditto.
6646 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6647 (initialize_low): Don't initialize the target_regsets here. Call
6648 initialize_low_arch.
6649 * linux-low.h (target_regsets): Delete declaration.
6650 (struct regsets_info): New.
6651 (struct usrregs_info): New.
6652 (struct regs_info): New.
6653 (struct process_info_private) <new_inferior>: New field.
6654 (struct linux_target_ops): Delete the num_regs, regmap, and
6655 regset_bitmap fields. New field regs_info.
6656 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6657 * i387-fp.c (num_xmm_registers): Delete.
6658 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6659 calls to new interface.
6660 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6661 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6662 Infer the number of xmm registers from the regcache's target
6664 * i387-fp.h (num_xmm_registers): Delete.
6665 * inferiors.c (add_thread): Don't install the thread's regcache
6667 * proc-service.c (gregset_info): Fetch the current inferior's
6668 regs_info. Adjust to use it.
6669 * regcache.c: Include tdesc.h.
6670 (register_bytes, reg_defs, num_registers)
6671 (gdbserver_expedite_regs): Delete.
6672 (get_thread_regcache): If the thread doesn't have a regcache yet,
6673 create one, instead of aborting gdbserver.
6674 (regcache_invalidate_one): Rename to ...
6675 (regcache_invalidate_thread): ... this.
6676 (regcache_invalidate_one): New.
6677 (regcache_invalidate): Only invalidate registers of the current
6679 (init_register_cache): Add target_desc parameter, and use it.
6680 (new_register_cache): Ditto. Assert the target description has a
6681 non zero registers_size.
6682 (regcache_cpy): Add assertions. Adjust.
6683 (realloc_register_cache, set_register_cache): Delete.
6684 (registers_to_string, registers_from_string): Adjust.
6685 (find_register_by_name, find_regno, find_register_by_number)
6686 (register_cache_size): Add target_desc parameter, and use it.
6687 (free_register_cache_thread, free_register_cache_thread_one)
6688 (regcache_release, register_cache_size): New.
6689 (register_size): Add target_desc parameter, and use it.
6690 (register_data, supply_register, supply_register_zeroed)
6691 (supply_regblock, supply_register_by_name, collect_register)
6692 (collect_register_as_string, collect_register_by_name): Adjust.
6693 * regcache.h (struct target_desc): Forward declare.
6694 (struct regcache) <tdesc>: New field.
6695 (init_register_cache, new_register_cache): Add target_desc
6697 (regcache_invalidate_thread): Declare.
6698 (regcache_invalidate_one): Delete declaration.
6699 (regcache_release): Declare.
6700 (find_register_by_number, register_cache_size, register_size)
6701 (find_regno): Add target_desc parameter.
6702 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6704 * remote-utils.c: Include tdesc.h.
6705 (outreg, prepare_resume_reply): Adjust.
6706 * server.c: Include tdesc.h.
6707 (gdbserver_xmltarget): Delete declaration.
6708 (get_features_xml, process_serial_event): Adjust.
6709 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6711 (struct process_info) <tdesc>: New field.
6712 (ipa_tdesc): Declare.
6713 * tdesc.c: New file.
6714 * tdesc.h: New file.
6715 * tracepoint.c: Include tdesc.h.
6716 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6717 (get_context_regcache): Adjust to pass ipa_tdesc down.
6718 (do_action_at_tracepoint): Adjust to get the register cache size
6719 from the context regcache's description.
6720 (traceframe_walk_blocks): Adjust to get the register cache size
6721 from the current trace frame's description.
6722 (traceframe_get_pc): Adjust to get current trace frame's
6723 description and pass it down.
6724 (gdb_collect): Adjust to get the register cache size from the
6726 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6727 (gdbserver_xmltarget): Delete.
6728 (initialize_low_tracepoint): Set the ipa's target description.
6729 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6730 (initialize_low_tracepoint): Set the ipa's target description.
6731 * linux-x86-low.c: Include tdesc.h.
6732 [__x86_64__] (is_64bit_tdesc): New.
6733 (ps_get_thread_area, x86_get_thread_area): Use it.
6734 (i386_cannot_store_register): Rename to ...
6735 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6736 (i386_cannot_fetch_register): Rename to ...
6737 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6738 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6740 (target_regsets): Rename to ...
6741 (x86_regsets): ... this.
6742 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6744 (x86_siginfo_fixup): Use is_64bit_tdesc.
6745 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6746 (tdesc_x32_avx_linux, tdesc_x32_linux)
6747 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6749 (x86_linux_update_xmltarget): Delete.
6750 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6751 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6752 (AMD64_LINUX_USER64_CS): New.
6753 (x86_linux_read_description): New, based on
6754 x86_linux_update_xmltarget.
6755 (same_process_callback): New.
6756 (x86_arch_setup_process_callback): New.
6757 (x86_linux_update_xmltarget): New.
6758 (x86_regsets_info): New.
6759 (amd64_linux_regs_info): New.
6760 (i386_linux_usrregs_info): New.
6761 (i386_linux_regs_info): New.
6762 (x86_linux_regs_info): New.
6763 (x86_arch_setup): Reimplement.
6764 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6765 (x86_emit_ops): Ditto.
6766 (the_low_target): Adjust. Install x86_linux_regs_info,
6767 x86_cannot_fetch_register, and x86_cannot_store_register.
6768 (initialize_low_arch): New.
6769 * linux-ia64-low.c (tdesc_ia64): Declare.
6770 (ia64_fetch_register): Adjust.
6771 (ia64_usrregs_info, regs_info): New globals.
6772 (ia64_regs_info): New function.
6773 (the_low_target): Adjust.
6774 (initialize_low_arch): New function.
6775 * linux-sparc-low.c (tdesc_sparc64): Declare.
6776 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6778 (sparc_arch_setup): New function.
6779 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6780 (the_low_target): Adjust.
6781 (initialize_low_arch): New function.
6782 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6783 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6784 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6785 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6786 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6787 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6788 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6789 (tdesc_powerpc_isa205_vsx64l): Declare.
6790 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6791 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6792 (ppc_set_pc, ppc_get_hwcap): Adjust.
6793 (ppc_usrregs_info): Forward declare.
6794 (!__powerpc64__) ppc_regmap_adjusted: New global.
6795 (ppc_arch_setup): Adjust to the current process'es target
6797 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6798 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6799 (ppc_store_evrregset): Adjust.
6800 (target_regsets): Rename to ...
6801 (ppc_regsets): ... this, and make static.
6802 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6803 (ppc_regs_info): New function.
6804 (the_low_target): Adjust.
6805 (initialize_low_arch): New function.
6806 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6807 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6808 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6809 (tdesc_s390x_linux64v2): Declare.
6810 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6811 (s390_fill_gregset, s390_store_last_break): Adjust.
6812 (target_regsets): Rename to ...
6813 (s390_regsets): ... this, and make static.
6814 (s390_get_pc, s390_set_pc): Adjust.
6815 (s390_get_hwcap): New target_desc parameter, and use it.
6816 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6817 (s390_arch_setup): Adjust to set the current process'es target
6818 description. Don't adjust the regmap.
6819 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6820 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6821 (regs_info_3264): New globals.
6822 (s390_regs_info): New function.
6823 (the_low_target): Adjust.
6824 (initialize_low_arch): New function.
6825 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6826 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6827 [__mips64] (init_registers_mips_linux)
6828 (init_registers_mips_dsp_linux): Delete defines.
6829 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6830 (have_dsp): New global.
6831 (mips_read_description): New, based on mips_arch_setup.
6832 (mips_arch_setup): Reimplement.
6833 (get_usrregs_info): New function.
6834 (mips_cannot_fetch_register, mips_cannot_store_register)
6835 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6836 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6837 (target_regsets): Rename to ...
6838 (mips_regsets): ... this, and make static.
6839 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6840 (dsp_regs_info, regs_info): New globals.
6841 (mips_regs_info): New function.
6842 (the_low_target): Adjust.
6843 (initialize_low_arch): New function.
6844 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6845 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6847 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6848 (arm_read_description): New, with bits factored from
6850 (arm_arch_setup): Reimplement.
6851 (target_regsets): Rename to ...
6852 (arm_regsets): ... this, and make static.
6853 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6854 (arm_regs_info): New function.
6855 (the_low_target): Adjust.
6856 (initialize_low_arch): New function.
6857 * linux-m68k-low.c (tdesc_m68k): Declare.
6858 (target_regsets): Rename to ...
6859 (m68k_regsets): ... this, and make static.
6860 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6861 (m68k_regs_info): New function.
6862 (m68k_arch_setup): New function.
6863 (the_low_target): Adjust.
6864 (initialize_low_arch): New function.
6865 * linux-sh-low.c (tdesc_sharch): Declare.
6866 (target_regsets): Rename to ...
6867 (sh_regsets): ... this, and make static.
6868 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6869 (sh_regs_info, sh_arch_setup): New functions.
6870 (the_low_target): Adjust.
6871 (initialize_low_arch): New function.
6872 * linux-bfin-low.c (tdesc_bfin): Declare.
6873 (bfin_arch_setup): New function.
6874 (bfin_usrregs_info, regs_info): New globals.
6875 (bfin_regs_info): New function.
6876 (the_low_target): Adjust.
6877 (initialize_low_arch): New function.
6878 * linux-cris-low.c (tdesc_cris): Declare.
6879 (cris_arch_setup): New function.
6880 (cris_usrregs_info, regs_info): New globals.
6881 (cris_regs_info): New function.
6882 (the_low_target): Adjust.
6883 (initialize_low_arch): New function.
6884 * linux-cris-low.c (tdesc_crisv32): Declare.
6885 (cris_arch_setup): New function.
6886 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6887 (cris_regs_info): New function.
6888 (the_low_target): Adjust.
6889 (initialize_low_arch): New function.
6890 * linux-m32r-low.c (tdesc_m32r): Declare.
6891 (m32r_arch_setup): New function.
6892 (m32r_usrregs_info, regs_info): New globals.
6893 (m32r_regs_info): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6896 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6897 (tic6x_usrregs_info): Forward declare.
6898 (tic6x_read_description): New function, based on ...
6899 (tic6x_arch_setup): ... this. Reimplement.
6900 (target_regsets): Rename to ...
6901 (tic6x_regsets): ... this, and make static.
6902 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6903 (tic6x_regs_info): New function.
6904 (the_low_target): Adjust.
6905 (initialize_low_arch): New function.
6906 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6907 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6908 (target_regsets): Rename to ...
6909 (xtensa_regsets): ... this, and make static.
6910 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6912 (xtensa_arch_setup, xtensa_regs_info): New functions.
6913 (the_low_target): Adjust.
6914 (initialize_low_arch): New function.
6915 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6916 (nios2_arch_setup): Set the current process'es tdesc.
6917 (target_regsets): Rename to ...
6918 (nios2_regsets): ... this.
6919 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6920 (nios2_regs_info): New function.
6921 (the_low_target): Adjust.
6922 (initialize_low_arch): New function.
6923 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6924 (aarch64_arch_setup): Set the current process'es tdesc.
6925 (target_regsets): Rename to ...
6926 (aarch64_regsets): ... this.
6927 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6928 (aarch64_regs_info): New function.
6929 (the_low_target): Adjust.
6930 (initialize_low_arch): New function.
6931 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6933 (target_regsets): Rename to ...
6934 (tile_regsets): ... this.
6935 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6936 (tile_regs_info): New function.
6937 (tile_arch_setup): Set the current process'es tdesc.
6938 (the_low_target): Adjust.
6939 (initialize_low_arch): New function.
6940 * spu-low.c (tdesc_spu): Declare.
6941 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6942 * win32-arm-low.c (tdesc_arm): Declare.
6943 (arm_arch_setup): New function.
6944 (the_low_target): Install arm_arch_setup instead of
6946 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6947 (init_windows_x86): Rename to ...
6948 (i386_arch_setup): ... this. Set `win32_tdesc'.
6949 (the_low_target): Adjust.
6950 * win32-low.c (win32_tdesc): New global.
6951 (child_add_thread): Don't create the thread cache here.
6952 (do_initial_child_stuff): Set the new process'es tdesc.
6953 * win32-low.h (struct target_desc): Forward declare.
6954 (win32_tdesc): Declare.
6955 * lynx-i386-low.c (tdesc_i386): Declare global.
6956 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6957 * lynx-low.c (lynx_tdesc): New global.
6958 (lynx_add_process): Set the new process'es tdesc.
6959 * lynx-low.h (struct target_desc): Forward declare.
6960 (lynx_tdesc): Declare global.
6961 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6962 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6963 * nto-low.c (nto_tdesc): New global.
6964 (do_attach): Set the new process'es tdesc.
6965 * nto-low.h (struct target_desc): Forward declare.
6966 (nto_tdesc): Declare.
6967 * nto-x86-low.c (tdesc_i386): Declare.
6968 (nto_x86_arch_setup): Set `nto_tdesc'.
6970 2013-06-04 Gary Benson <gbenson@redhat.com>
6972 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6973 to qSupported response when appropriate.
6974 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6975 with nonzero-length annex.
6976 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6977 arguments supplied in annex.
6979 2013-05-31 Doug Evans <dje@google.com>
6982 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6983 64 bits in 64-cross-32 environment.
6985 2013-05-28 Pedro Alves <palves@redhat.com>
6987 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6988 (aarch64-without-fpu.c): Delete rule.
6989 * configure.srv (aarch64*-*-linux*): Remove references to
6990 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6991 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6994 2013-05-24 Pedro Alves <palves@redhat.com>
6996 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6997 instead of strchr/decode_address. Error if the range isn't split
6998 with a ','. Don't assume there's be a ':' in the action.
7000 2013-05-23 Yao Qi <yao@codesourcery.com>
7001 Pedro Alves <palves@redhat.com>
7003 * linux-low.c (lwp_in_step_range): New function.
7004 (linux_wait_1): If the thread was range stepping and stopped
7005 outside the stepping range, report the stop to GDB. Otherwise,
7006 continue stepping. Add range stepping debug output.
7007 (linux_set_resume_request): Copy the step range from the resume
7009 (linux_supports_range_stepping): New.
7010 (linux_target_ops) <supports_range_stepping>: Set to
7011 linux_supports_range_stepping.
7012 * linux-low.h (struct linux_target_ops)
7013 <supports_range_stepping>: New field.
7014 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7015 * linux-x86-low.c (x86_supports_range_stepping): New.
7016 (the_low_target) <supports_range_stepping>: Set to
7017 x86_supports_range_stepping.
7018 * server.c (handle_v_cont): Handle 'r' action.
7019 (handle_v_requests): Append ";r" if the target supports range
7021 * target.h (struct thread_resume) <step_range_start,
7022 step_range_end>: New fields.
7023 (struct target_ops) <supports_range_stepping>:
7025 (target_supports_range_stepping): New macro.
7027 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7029 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7030 confusion in comment.
7032 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7034 * lynx-low.c (struct process_info_private): New type.
7035 (lynx_add_process): New function.
7036 (lynx_create_inferior, lynx_attach): Replace calls to
7037 add_process by calls to lynx_add_process.
7038 (lynx_resume): If PTID is null, then try using
7039 current_process()->private->last_wait_event_ptid.
7041 (lynx_clear_inferiors): Delete. The contents of that function
7042 has been inlined in lynx_mourn;
7043 (lynx_wait_1): Save the ptid in the process's private data.
7044 (lynx_mourn): Free the process' private data. Replace call
7045 to lynx_clear_inferiors by call to clear_inferiors.
7047 2013-05-17 Yao Qi <yao@codesourcery.com>
7049 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7052 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7054 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7055 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7056 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7057 PT_TEXT_END_ADDR guards. Update comments.
7058 (linux_target_op) <read_offsets>: Conditionally define to
7059 linux_read_offsets if the target is UCLIBC and if it defines
7060 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7062 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7063 Andrew Jenner <andrew@codesourcery.com>
7065 * Makefile.in (SFILES): Add linux-nios2-low.c.
7066 (clean): Add action to delete nios2-linux.c.
7067 (nios2-linux.c): New rule.
7068 * configure.srv: Add nios2*-*-linux*.
7069 * linux-nios2-low.c: New.
7071 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7073 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7075 2013-04-25 Hui Zhu <hui@codesourcery.com>
7078 * ax.c (ax_printf): Add fflush.
7080 2013-04-22 Tom Tromey <tromey@redhat.com>
7082 * Makefile.in (SFILES): Add filestuff.c.
7083 (OBS): Add filestuff.o.
7084 (filestuff.o): New target.
7085 * config.in, configure: Rebuild.
7086 * configure.ac: Check for fdwalk, pipe2.
7088 2013-04-17 Pedro Alves <palves@redhat.com>
7090 * configure.ac (USE_THREAD_DB): Delete variable.
7091 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7092 Don't AC_SUBST USE_THREAD_DB.
7093 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7094 * config.in, configure: Regenerate.
7096 2013-04-16 Pedro Alves <palves@redhat.com>
7098 * linux-low.h (struct lwp_info) <thread_known>: Move under
7099 the USE_THREAD_DB #ifdef.
7101 2013-04-16 Pedro Alves <palves@redhat.com>
7103 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7104 (linux-low.o): Delete rule.
7105 * linux-low.h: Always include "gdb_thread_db.h" instead of
7106 conditionally including thread_db.h.
7107 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7110 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7112 * Makefile.in (install-only): Fix make install regression.
7114 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7116 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7117 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7119 * gdbserver.1: Remove.
7121 2013-03-22 Pedro Alves <palves@redhat.com>
7123 * linux-low.c (handle_extended_wait): Don't call
7124 linux_enable_event_reporting.
7126 2013-03-15 Tony Theodore <tonyt@logyst.com>
7129 * Makefile.in (SHELL): Use @SHELL@.
7131 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7133 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7136 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7138 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7139 Remove extraneous NULL element.
7141 2013-03-13 Yao Qi <yao@codesourcery.com>
7143 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7144 'V' block in trace frame.
7146 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7148 * target.h (struct target_ops): Add btrace ops.
7149 (target_supports_btrace): New macro.
7150 (target_enable_btrace): New macro.
7151 (target_disable_btrace): New macro.
7152 (target_read_btrace): New macro.
7153 * gdbthread.h (struct thread_info): Add btrace field.
7154 * server.c: Include btrace-common.h.
7155 (handle_btrace_general_set): New function.
7156 (handle_btrace_enable): New function.
7157 (handle_btrace_disable): New function.
7158 (handle_general_set): Call handle_btrace_general_set.
7159 (handle_qxfer_btrace): New function.
7160 (struct qxfer qxfer_packets[]): Add btrace entry.
7161 * inferiors.c (remove_thread): Disable btrace.
7162 * linux-low: Include linux-btrace.h.
7163 (linux_low_enable_btrace): New function.
7164 (linux_low_read_btrace): New function.
7165 (linux_target_ops): Add btrace ops.
7166 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7167 Add srv_linux_btrace=yes.
7168 (x86_64-*-linux*): Add linux-btrace.o.
7169 Add srv_linux_btrace=yes.
7170 * configure.ac: Define HAVE_LINUX_BTRACE.
7171 * config.in: Regenerated.
7172 * configure: Regenerated.
7174 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7176 * server.c (handle_qxfer): Preserve error message if -3 is
7178 (qxfer): Document the -3 return value.
7180 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7182 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7183 (linux_btrace_h): New variable.
7184 (linux-btrace.o): New rule.
7186 2013-03-08 Stan Shebs <stan@codesourcery.com>
7187 Hafiz Abid Qadeer <abidh@codesourcery.com>
7189 * tracepoint.c (trace_buffer_size): New global.
7190 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7191 (init_trace_buffer): Change to one-argument function. Allocate
7192 trace buffer memory.
7193 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7194 handle QTBuffer:size packet.
7195 (cmd_bigqtbuffer_size): New function.
7196 (initialize_tracepoint): Call init_trace_buffer with
7197 DEFAULT_TRACE_BUFFER_SIZE.
7198 * server.c (handle_query): Add QTBuffer:size in the
7201 2013-03-07 Yao Qi <yao@codesourcery.com>
7203 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7204 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7206 (cmd_qtsp): Adjust condition. Do post increment.
7207 Set cur_action and cur_step_action back to 0.
7209 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7212 * linux-low.c (linux_write_memory): Return early success if LEN is
7215 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7217 * configure.srv: Add x86_64-*-cygwin* as target.
7219 2013-02-28 Tom Tromey <tromey@redhat.com>
7221 * configure.ac: Invoke AC_SYS_LARGEFILE.
7222 * configure, config.in: Rebuild.
7224 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7226 * win32-low.c: Throughout, fix format strings and casts of
7227 printf-like functions to avoid type related warnings on all
7229 (get_child_debug_event): Print dwDebugEventCode as hex since
7230 that's how it's usually documented.
7232 2013-02-28 Yao Qi <yao@codesourcery.com>
7234 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7237 2013-02-27 Jiong Wang <jiwang@tilera.com>
7239 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7240 (reg-tilegx32.c): New rule.
7241 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7242 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7243 different register info initializer according to elf class.
7244 (init_registers_tilgx32): New function. The tilegx32 register info
7246 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7247 (tile_store_gregset): Likewise.
7249 2013-02-27 Yao Qi <yao@codesourcery.com>
7251 * server.c (process_point_options): Print debug message when
7252 debug_threads is true.
7254 2013-02-26 Yao Qi <yao@codesourcery.com>
7256 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7258 2013-02-19 Pedro Alves <palves@redhat.com>
7259 Kai Tietz <ktietz@redhat.com>
7263 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7264 instead of strtoul to extract address from packet.
7265 (process_serial_event) <'z'>: Likewise.
7267 2013-02-18 Yao Qi <yao@codesourcery.com>
7269 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7271 2013-02-14 Pedro Alves <palves@redhat.com>
7275 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7276 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7278 2013-02-14 Pedro Alves <palves@redhat.com>
7280 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7282 2013-02-14 Pedro Alves <palves@redhat.com>
7284 * tracepoint.c (save_string): Delete.
7285 (add_tracepoint_action): Use savestring instead of save_string.
7287 2013-02-12 Pedro Alves <palves@redhat.com>
7289 * linux-xtensa-low.c: Ditto.
7290 * xtensa-xtregs.c: Ditto.
7292 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7294 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7297 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7299 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7300 aarch64_num_wp_regs and aarch64_num_bp_regs to
7301 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7303 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7305 * linux-aarch64-low.c (ps_get_thread_area): Replace
7306 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7308 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7309 Marcus Shawcroft <marcus.shawcroft@arm.com>
7310 Nigel Stephens <nigel.stephens@arm.com>
7311 Yufeng Zhang <yufeng.zhang@arm.com>
7313 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7314 (aarch64.c, aarch64-without-fpu.c): New targets.
7315 * configure.srv (aarch64*-*-linux*): New.
7316 * linux-aarch64-low.c: New file.
7318 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7320 * linux-low.c (handle_extended_wait, linux_create_inferior)
7321 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7322 (dequeue_one_deferred_signal, linux_resume_one_thread)
7323 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7324 (linux_tracefork_grandchild, linux_test_for_tracefork)
7325 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7326 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7327 where the argument is 0.
7329 2013-01-25 Yao Qi <yao@codesourcery.com>
7331 * event-loop.c: Include "queue.h".
7332 (gdb_event_p): New typedef.
7333 (struct gdb_event) <next_event>: Remove.
7334 (event_queue): Change to QUEUE(gdb_event_p).
7335 (async_queue_event): Remove.
7336 (gdb_event_xfree): New.
7337 (initialize_event_loop): New.
7338 (process_event): Use API from QUEUE.
7339 (wait_for_event): Likewise.
7340 * server.c (main): Call initialize_event_loop.
7341 * server.h (initialize_event_loop): Declare.
7343 2013-01-18 Yao Qi <yao@codesourcery.com>
7345 * ax.h (struct eval_agent_expr_context): New.
7346 (gdb_eval_agent_expr): Update declaration.
7347 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7348 TFRAME. Add new argument CTX.
7349 * server.h (struct eval_agent_expr_context): Declare.
7350 (agent_mem_read, agent_tsv_read): Update declaration.
7351 (agent_mem_read_string): Likewise.
7352 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7353 (add_traceframe_block): Add new argument TPOINT.
7354 Increase TPOINT->traceframe_usage.
7355 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7356 eval_tracepoint_agent_expr.
7357 (condition_true_at_tracepoint): Likewise.
7358 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7359 (agent_mem_read_string, agent_tsv_read): Likewise.
7361 2013-01-16 Yao Qi <yao@codesourcery.com>
7363 * linux-low.c (linux_resume_one_lwp): Don't check
7364 'lwp->bp_reinsert != 0'.
7366 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7367 Pedro Alves <palves@redhat.com>
7369 * lynx-low.c (ptrace_request_to_str): Define a temporary
7370 macro and use it to simplify this function's implementation.
7372 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7374 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7377 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7379 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7381 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7383 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7385 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7387 * lynx-low.c (lynx_resume): Use the resume_info parameter
7388 to determine the ptid for the lynx_ptrace call, unless
7389 it is equal to minus_one_ptid, in which case we use the
7390 ptid of the current_inferior.
7391 (lynx_wait_1): After having received a thread create/exit
7392 event, resume the inferior's execution using the signaling
7393 thread's ptid, rather than the old ptid.
7395 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7397 * lynx-low.c (lynx_resume): Delete variable ret.
7399 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7401 * gdbreplay.c (gdbreplay_version): Update copyright year.
7402 * server.c (gdbserver_version): Likewise.
7404 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7406 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7409 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7411 * lynx-low.c (ptrace_request_to_str): Add handling for
7414 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7416 * lynx-low.c (lynx_attach): Delete variable new_process.
7418 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7420 * lynx-low.c (lynx_create_inferior): Delete variable
7423 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7425 * lynx-low.c (ptrace_request_to_str): Do not handle
7426 PTRACE_GETTHREADLIST if this macro does not exist.
7428 2012-12-15 Yao Qi <yao@codesourcery.com>
7430 * Makefile.in (OBS): Add notif.o.
7431 * notif.c, notif.h: New.
7432 * server.c: Include "notif.h".
7433 (struct vstop_notif) <next>: Remove.
7435 (queue_stop_reply): Update.
7436 (push_event, send_next_stop_reply): Remove.
7437 (discard_queued_stop_replies): Update.
7438 (notif_stop): New variable.
7439 (handle_v_stopped): Remove.
7440 (handle_v_requests): Don't call handle_v_stopped. Call
7441 handle_ack_notif instead.
7442 (queue_stop_reply_callback): Call notif_event_enque instead
7443 of queue_stop_reply.
7444 (handle_status): Don't call send_next_stop_reply, call
7445 notif_write_event instead.
7446 (kill_inferior_callback): Likewise.
7447 (detach_or_kill_inferior_callback): Likewise.
7448 (main): Call initialize_notif.
7449 (process_serial_event): Call QUEUE_is_empty.
7450 (handle_target_event): Call notif_push instead of push event.
7451 * server.h (push_event): Remove declaration.
7453 2012-12-10 Tom Tromey <tromey@redhat.com>
7455 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7456 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7459 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7460 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7461 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7462 (amd64-linux-ipa.o, ax.o): Rewrite.
7463 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7464 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7465 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7466 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7467 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7468 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7469 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7470 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7471 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7472 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7473 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7474 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7475 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7476 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7477 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7478 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7479 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7480 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7481 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7482 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7483 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7484 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7485 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7486 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7487 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7488 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7489 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7490 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7491 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7492 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7493 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7494 (reg-tilegx.o): Remove.
7495 (all_object_files): New macro.
7496 Include .deps files.
7497 * aclocal.m4, configure: Rebuild.
7498 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7499 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7500 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7502 2012-12-05 Tom Tromey <tromey@redhat.com>
7505 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7507 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7509 * configure.ac: Check for linux/perf_event.h.
7510 * config.in: Regenerated.
7511 * configure: Regenerated.
7513 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7515 * hostio.c (handle_readlink): Decrease buffer size
7516 parameter passed to readlink by one byte.
7518 2012-11-26 Yao Qi <yao@codesourcery.com>
7520 * configure.ac (build_warnings): Append '-Wempty-body'.
7521 * configure: Regenerated.
7522 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7525 2012-11-15 Pierre Muller <muller@sourceware.org>
7527 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7528 * config.in: Regenerate.
7529 * configure: Regenerate.
7530 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7531 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7532 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7533 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7535 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7536 instead of <sys/wait.h> header.
7537 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7539 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7541 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7542 (various make rules): Remove -DGDBSERVER
7544 2012-11-09 Yao Qi <yao@codesourcery.com>
7546 * spu-low.c (current_ptid): Move it to ..
7547 * gdbthread.h: ... here. New.
7548 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7549 * server.c (myresume, process_serial_event): Likewise.
7550 * thread-db.c (thread_db_find_new_threads): Likewise.
7551 * tracepoint.c (run_inferior_command): Likewise.
7553 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7555 * server.c (handle_search_memory_1): Include access length in
7558 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7560 * linux-crisv32-low.c: Fix compile errors.
7562 2012-09-04 Yao Qi <yao@codesourcery.com>
7564 * tracepoint.c (cmd_qtsv): Adjust debug message.
7565 Don't check CUR_TPOINT.
7567 2012-08-28 Yao Qi <yao@codesourcery.com>
7569 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7570 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7571 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7572 Remove declarations of xmalloc, xreallloc, xstrdup and
7574 * Makefile.in (libiberty_h): New.
7575 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7576 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7578 2012-08-23 Yao Qi <yao@codesourcery.com>
7580 * server.h: Remove declaration of 'xsnprintf'.
7582 2012-08-22 Keith Seitz <keiths@redhat.com>
7584 * server.h: Include build-gnulib-gbserver/config.h.
7585 * gdbreplay.c: Likewise.
7587 2012-08-08 Doug Evans <dje@google.com>
7589 * Makefile.in (SFILES): Add gdb_vecs.c.
7590 (OBS): Add gdb_vecs.o.
7591 (gdb_vecs_h, host_defs_h): New variables.
7592 (thread-db.o): Add $(gdb_vecs_h) dependency.
7593 (gdb_vecs.o): New rule.
7594 * thread-db.c: #include "gdb_vecs.h".
7595 (thread_db_load_search): Use a vector to iterate over path elements.
7596 Handle text appearing after "$pdir".
7598 * configure.ac: Add check for strstr.
7599 * config.in: Regenerate.
7600 * configure: Regenerate.
7602 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7604 * hostio.c (handle_pread): If pread fails, fall back to attempting
7606 (handle_pwrite): Likewise for pwrite.
7608 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7610 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7611 between unsupported TYPE and unimplementable ADDR/LEN combination.
7612 (arm_insert_point): Act on new return value.
7614 2012-07-31 Pedro Alves <palves@redhat.com>
7616 * server.c (process_point_options): Only skip tokens if we find
7617 one that is unrecognized. Don't treat 'X' specially while
7618 skipping unrecognized tokens.
7620 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7622 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7623 to 4-byte-align HW breakpoint addresses for Thumb.
7625 2012-07-27 Yao Qi <yao@codesourcery.com>
7629 * server.h: Declare gdb_agent_about_to_close.
7630 * target.c (kill_inferior): Include "agent.h".
7631 New. Send command 'kill'.
7632 * target.h (kill_inferior): Removed macro.
7633 * tracepoint.c (gdb_agent_about_to_close): New.
7634 (gdb_agent_helper_thread): Handle command 'close'.
7635 Wait endlessly until the inferior stops.
7636 Install gdb_agent_remove_socket to atexit hook.
7637 (agent_socket_name): New static variable.
7638 (gdb_agent_socket_init): Replace local variable 'name' with
7639 'agent_socket_name'.
7640 (gdb_agent_remove_socket): New.
7642 2012-07-27 Yao Qi <yao@codesourcery.com>
7644 * server.c (process_point_options): Stop at 'X' when parsing.
7646 2012-07-19 Michael Eager <eager@eagercon.com>
7648 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7650 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7651 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7652 hardware breakpoint.
7654 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7656 * gdbserver/linux-low.c (initialize_low): Call
7657 linux_ptrace_init_warnings.
7659 2012-07-02 Doug Evans <dje@google.com>
7661 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7664 2012-07-02 Stan Shebs <stan@codesourcery.com>
7666 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7667 (ax.o): Add it to build rule.
7669 (OBS): Add format.o.
7670 (IPA_OBS): Add format.o.
7671 * server.c (handle_query): Claim support for breakpoint commands.
7672 (process_point_options): Add command case.
7673 (process_serial_event): Leave running if there are printfs in
7675 * mem-break.h (any_persistent_commands): Declare.
7676 (add_breakpoint_commands): Declare.
7677 (gdb_no_commands_at_breakpoint): Declare.
7678 (run_breakpoint_commands): Declare.
7679 * mem-break.c (struct point_command_list): New struct.
7680 (struct breakpoint): New field command_list.
7681 (any_persistent_commands): New function.
7682 (add_commands_to_breakpoint): New function.
7683 (add_breakpoint_commands): New function.
7684 (gdb_no_commands_at_breakpoint): New function.
7685 (run_breakpoint_commands): New function.
7686 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7688 * ax.c: Include format.h.
7689 (ax_printf): New function.
7690 (gdb_eval_agent_expr): Add printf opcode.
7692 2012-06-13 Yao Qi <yao@codesourcery.com>
7694 * server.c (start_inferior): Remove duplicated writes to fields
7695 'last_resume_kind' and 'last_status' of 'current_inferior'.
7697 2012-06-12 Yao Qi <yao@codesourcery.com>
7698 Pedro Alves <palves@redhat.com>
7700 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7702 * server.c (handle_v_cont): Extend comment.
7704 2012-06-11 Yao Qi <yao@codesourcery.com>
7706 * linux-low.c (linux_attach): Add 'static'.
7708 2012-06-06 Yao Qi <yao@codesourcery.com>
7710 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7712 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7714 Fix gcc -flto compilation warning.
7715 * server.c (main): Make variable multi_mode and attach volatile.
7717 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7719 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7720 if the platform doesn't know about it.
7722 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7724 * Makefile.in (SFILES): Add linux-tile-low.c.
7725 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7726 * configure.srv: Handle tilegx-*-linux*.
7727 * linux-tile-low.c: New file.
7729 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7731 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7733 2012-05-24 Pedro Alves <palves@redhat.com>
7737 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7739 2012-05-24 Pedro Alves <palves@redhat.com>
7743 Replace target_signal with gdb_signal throughout.
7745 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7747 * linux-low.c (linux_store_registers): Avoid the copying sequence
7748 when no data has been retrieved by ptrace.
7750 2012-05-22 Will Deacon <will.deacon@arm.com>
7752 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7753 Include asm/ptrace.h.
7754 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7757 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7759 * linux-low.c (linux_store_registers): Don't re-retrieve data
7760 with ptrace that has already been obtained from /proc. Always
7761 copy any data retrieved with ptrace to the buffer supplied.
7763 2012-05-11 Yao Qi <yao@codesourcery.com>
7764 Pedro Alves <palves@redhat.com>
7766 * linux-low.c (enum stopping_threads_kind): New.
7767 (stopping_threads): Change type to `enum stopping_threads_kind'.
7768 (handle_extended_wait): If stopping and suspending threads, leave
7769 the new_lwp suspended too.
7770 (linux_wait_for_event): Adjust.
7771 (stop_all_lwps): Set `stopping_threads' to
7772 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7773 whether we're suspending threads or just stopping them. Assert no
7776 2012-04-29 Yao Qi <yao@codesourcery.com>
7778 * server.h: Move some code to ...
7779 * gdbthread.h: ... here. New.
7780 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7781 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7782 (nto-low.o, win32-low.o): Likewise.
7783 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7784 * regcache.c, remote-utils.c, server.c: Likewise.
7785 * target.c, tracepoint.c, win32-low.c: Likewise.
7787 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7789 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7790 (PTRACE_ARG4_TYPE): Likewise.
7791 (PTRACE_XFER_TYPE): Likewise.
7792 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7793 ptrace to PTRACE_ARG3_TYPE.
7794 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7795 (PTRACE_ARG4_TYPE): Likewise.
7796 (PTRACE_XFER_TYPE): Likewise.
7797 (linux_detach_one_lwp): Cast fourth argument of
7798 ptrace to long then PTRACE_ARG4_TYPE.
7799 (regsets_fetch_inferior_registers): Cast third argument of
7800 ptrace to long then PTRACE_ARG3_TYPE.
7801 (regsets_store_inferior_registers): Likewise.
7803 2012-04-20 Pedro Alves <palves@redhat.com>
7805 * configure: Regenerate.
7807 2012-04-19 Pedro Alves <palves@redhat.com>
7809 * Makefile.in (GNULIB_BUILDDIR): New.
7810 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7811 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7812 (all, install-only, uninstall, clean-info, all-lib, clean): No
7813 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7814 (maintainer-clean realclean distclean): Use subdir_do.
7816 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7817 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7818 * acinclude.m4: Include acx_configure_dir.m4.
7819 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7820 calls. Call AC_PROG_RANLIB. Configure gnulib using
7823 (GNULIB_STDINT_H): Adjust.
7824 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7825 * gdbreplay.c: Include build-gnulib/config.h.
7826 * server.h: Likewise.
7827 * aclocal.m4: Regenerate.
7828 * config.in: Regenerate.
7829 * configure: Regenerate.
7831 2012-04-19 Pedro Alves <palves@redhat.com>
7833 * Makefile.in (LIBGNU, INCGNU): Adjust.
7834 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7835 (all, install-only, uninstall, clean-info, all-lib, clean)
7836 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7837 * configure.ac: Adjust AC_OUTPUT output.
7838 * aclocal.m4: Regenerate.
7839 * configure: Regenerate.
7841 2012-04-19 Pedro Alves <palves@redhat.com>
7843 * Makefile.in (generated_files): New.
7844 (server_h): Remove the explicit dependency on config.h, and depend
7845 on $generated_files.
7847 2012-04-19 Pedro Alves <palves@redhat.com>
7849 * Makefile.in (INCGNU): Add -Ignulib.
7851 2012-04-19 Pedro Alves <palves@redhat.com>
7853 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7854 (INCGNU): ... this, and spell out -I here.
7855 (GNULIB_LIB): Rename to ...
7857 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7859 2012-04-19 Pedro Alves <palves@redhat.com>
7861 * config.in: Regenerate.
7863 2012-04-19 Pedro Alves <palves@redhat.com>
7865 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7866 * server.h (memmem): Remove declaration.
7867 * config.in: Regenerate.
7868 * configure: Regenerate.
7870 2012-04-19 Yao Qi <yao@codesourcery.com>
7872 * Makefile.in (SFILES): Add common/vec.c.
7876 2012-04-19 Yao Qi <yao@codesourcery.com>
7878 * remote-utils.c (prepare_resume_reply): Replace with macro
7879 target_core_of_thread.
7880 * server.c (handle_qxfer_threads_proper): Likewise.
7881 * target.h (traget_core_of_thread): New macro.
7883 2012-04-18 Pedro Alves <palves@redhat.com>
7885 * aclocal.m4: Regenerate.
7886 * configure: Regenerate.
7888 2012-04-16 Yao Qi <yao@codesourcery.com>
7890 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7891 duplicated on address.
7893 2012-04-16 Yao Qi <yao@codesourcery.com>
7895 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7896 (struct tracepoint_action_ops) <send>: New field.
7897 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7898 (agent_expr_send, x_tracepoint_action_send): New.
7899 (l_tracepoint_action_send): New.
7900 (cmd_qtdp): Download and install tracepoint
7901 according to `use_agent'.
7902 (run_inferior_command): Add one more parameter `len'.
7904 (tracepoint_send_agent): New.
7905 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7907 2012-04-16 Yao Qi <yao@codesourcery.com>
7909 * tracepoint.c (download_tracepoints): Moved to ...
7910 (cmd_qtstart): ... here.
7912 2012-04-14 Yao Qi <yao@codesourcery.com>
7914 * tracepoint.c: Include inttypes.h.
7915 (struct collect_memory_action): Use sized types.
7916 (struct tracepoint): Likewise.
7917 (cmd_qtdp, stop_tracing): Update print specifiers.
7918 (cmd_qtp, response_tracepoint): Likewise.
7919 (collect_data_at_tracepoint): Likewise.
7920 (collect_data_at_step): Likewise.
7922 2012-04-14 Yao Qi <yao@codesourcery.com>
7924 Import gnulib module inttypes.
7925 * aclocal.m4, config.in, configure: Regenerated.
7927 2012-04-14 Yao Qi <yao@codesourcery.com>
7929 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7930 Makefile and config.status at last.
7932 2012-04-13 Yao Qi <yao@codesourcery.com>
7934 * tracepoint.c: Include stdint.h unconditionally.
7936 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7938 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7939 on BFD_HAVE_SYS_PROCFS_TYPE.
7940 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7941 * configure: Regenerate.
7942 * config.in: Likewise.
7944 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7946 * Makefile.in (clean): Also remove x32.c x32-linux.c
7947 x32-avx.c x32-avx-linux.c.
7948 (x32.o): New target.
7950 (x32-linux.o): Likewise.
7951 (x32-linux.c): Likewise.
7952 (x32-avx.o): Likewise.
7953 (x32-avx.c): Likewise.
7954 (x32-avx-linux.o): Likewise.
7955 (x32-avx-linux.c): Likewise.
7957 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7958 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7959 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7960 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7961 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7962 i386/x32-avx-linux.xml.
7964 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7965 (init_registers_x32_avx_linux): Likwise.
7966 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7967 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7969 2012-04-13 Pedro Alves <palves@redhat.com>
7971 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7972 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7973 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7974 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7977 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7979 * linux-x86-low.c (compat_x32_clock_t): New.
7980 (compat_x32_siginfo_t): Likewise.
7981 (compat_x32_siginfo_from_siginfo): Likewise.
7982 (siginfo_from_compat_x32_siginfo): Likewise.
7983 (linux_is_elf64): Likewise.
7984 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7985 and siginfo_from_compat_x32_siginfo for x32.
7986 (x86_arch_setup): Set linux_is_elf64.
7988 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7991 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7993 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7994 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7995 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7996 compatible with process.
7998 2012-04-12 Yao Qi <yao@codesourcery.com>
8000 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8001 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8002 (install-only, install-info, clean): Handle sub dir gnulib.
8003 (all-lib, am--refresh): New targets.
8004 (memmem.o): Remove target.
8005 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8006 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8007 (AC_REPLACE_FUNCS): Remove memmem.
8008 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8009 (AC_OUTPUT): Generate Makefile in gnulib/.
8010 * aclocal.m4, config.in, configure: Regenerated.
8012 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8014 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8016 2012-04-05 Pedro Alves <palves@redhat.com>
8018 -Werror=strict-aliasing
8020 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8023 2012-04-04 Pedro Alves <palves@redhat.com>
8025 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8026 (sparc_store_gregset_from_stack, sparc_store_gregset)
8027 (sparc_breakpoint_at): Fix formatting.
8029 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8031 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8033 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8034 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8035 * config.in: Regenerate.
8036 * configure: Likewise.
8038 2012-03-29 Pedro Alves <palves@redhat.com>
8040 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8041 Correct ptrace arguments.
8043 2012-03-28 Pedro Alves <palves@redhat.com>
8045 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8046 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8047 (IA64_FR1_REGNUM): New defines.
8048 (ia64_fetch_register): New.
8049 (the_low_target): Install it.
8050 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8052 * linux-low.c (linux_fetch_registers): Try the
8053 the_low_target.fetch_register hook first.
8055 * linux-arm-low.c (the_low_target): Adjust.
8056 * linux-bfin-low.c (the_low_target): Adjust.
8057 * linux-cris-low.c (the_low_target): Adjust.
8058 * linux-crisv32-low.c (the_low_target): Adjust.
8059 * linux-m32r-low.c (the_low_target): Adjust.
8060 * linux-m68k-low.c (the_low_target): Adjust.
8061 * linux-mips-low.c (the_low_target): Adjust.
8062 * linux-ppc-low.c (the_low_target): Adjust.
8063 * linux-s390-low.c (the_low_target): Adjust.
8064 * linux-sh-low.c (the_low_target): Adjust.
8065 * linux-sparc-low.c (the_low_target): Adjust.
8066 * linux-tic6x-low.c (the_low_target): Adjust.
8067 * linux-x86-low.c (the_low_target): Adjust.
8068 * linux-xtensa-low.c (the_low_target): Adjust.
8070 2012-03-26 Pedro Alves <palves@redhat.com>
8072 * server.c (handle_qxfer_libraries): Don't bail early if
8073 the_target->qxfer_libraries_svr4 is not NULL.
8075 2012-03-26 Pedro Alves <palves@redhat.com>
8077 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8079 2012-03-23 Pedro Alves <palves@redhat.com>
8081 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8082 "library-list-svr4" element's start tag when the the DSO list is
8085 2012-03-23 Pedro Alves <palves@redhat.com>
8087 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8088 a variable whose type size is the same as the inferior's pointer
8091 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8093 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8095 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8096 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8097 * linux-low.h: Include <signal.h>.
8098 (struct siginfo): Remove forward declaration.
8099 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8102 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8104 * .gitignore: Ignore more files.
8106 2012-03-19 Pedro Alves <palves@redhat.com>
8107 Jan Kratochvil <jan.kratochvil@redhat.com>
8109 * server.c (cont_thread, general_thread): Add describing comments.
8110 (start_inferior): Clear `cont_thread'.
8111 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8114 2012-03-15 Yao Qi <yao@codesourcery.com>
8116 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8118 (cmd_qtdp): ... here.
8120 2012-03-15 Yao Qi <yao@codesourcery.com>
8122 * tracepoint.c (struct tracepoint_action_ops): New.
8123 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8124 (m_tracepoint_action_download): New.
8125 (r_tracepoint_action_download): New.
8126 (x_tracepoint_action_download): New.
8127 (l_tracepoint_action_download): New.
8128 (add_tracepoint_action): Install `action->ops' according type.
8129 (download_tracepoint_1): Move code `download' function pointer
8130 of various tracepoint_action_ops.
8132 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8134 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8135 linux_ptrace_attach_warnings.
8137 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8139 * Makefile.in (linux-ptrace.o): New.
8140 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8141 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8142 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8143 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8144 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8146 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8148 2012-03-08 Yao Qi <yao@codesourcery.com>
8149 Pedro Alves <palves@redhat.com>
8151 Fix PR server/13392.
8152 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8154 * tracepoint.c (remove_tracepoint): New.
8155 (cmd_qtdp): Call remove_tracepoint when failed to install.
8157 2012-03-07 Pedro Alves <palves@redhat.com>
8159 * linux-low.c (get_detach_signal): New.
8160 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8161 Pass on pending signals to PTRACE_DETACH. Check the result of the
8163 * server.c (program_signals, program_signals_p): New.
8164 (handle_general_set): Handle QProgramSignals.
8165 * server.h (program_signals, program_signals_p): Declare.
8167 2012-03-05 Pedro Alves <palves@redhat.com>
8168 Jan Kratochvil <jan.kratochvil@redhat.com>
8170 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8173 2012-03-03 Yao Qi <yao@codesourcery.com>
8175 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8176 agent_look_up_symbols.
8178 2012-03-03 Yao Qi <yao@codesourcery.com>
8180 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8181 (linux-x86-low.o): Likewise.
8182 * server.h: Remove in_process_agent_loaded.
8183 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8187 2012-03-03 Yao Qi <yao@codesourcery.com>
8189 * tracepoint.c (gdb_agent_capability): New global.
8190 (in_process_agent_loaded_ust): Renamed to
8191 `in_process_agent_supports_ust'.
8193 (in_process_agent_supports_ust): Call agent_capability_check.
8194 (clear_installed_tracepoints): Assert that agent supports
8197 2012-03-03 Yao Qi <yao@codesourcery.com>
8199 * linux-low.c (linux_supports_agent): New.
8200 (linux_target_ops): Initialize field `supports_agent' with
8201 linux_supports_agent.
8202 * target.h (struct target_ops) <supports_agent>: New.
8203 (target_supports_agent): New macro.
8204 * server.c (handle_general_set): Handle packet 'QAgent'.
8205 (handle_query): Send `QAgent+'.
8206 * Makefile.in (server.o): Depends on agent.h.
8208 2012-03-03 Yao Qi <yao@codesourcery.com>
8210 * Makefile.in (OBS): Add agent.o.
8211 Add new rule for agent.o.
8212 Track dependence of tracepoint.c on agent.h.
8213 * tracepoint.c (run_inferior_command_1):
8214 (run_inferior_command): Call agent_run_command.
8215 (gdb_ust_connect_sync_socket): Deleted. Move it to
8217 (resume_thread, stop_thread): Likewise.
8218 (gdb_ust_socket_init): Renamed to ...
8219 (gdb_agent_socket_init): ... New.
8220 (gdb_ust_thread): Renamed to ...
8221 (gdb_agent_helper_thread): ... New.
8222 (gdb_ust_init): Move some code to ...
8223 (gdb_agent_init): ... here. New.
8224 [HAVE_UST]: Call gdb_ust_init.
8225 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8226 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8227 * config.in, configure: Regenerated.
8229 2012-03-02 Pedro Alves <palves@redhat.com>
8231 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8232 * linux-low.c (struct simple_pid_list): New.
8233 (stopped_pids): New a struct simple_pid_list pointer.
8234 (add_to_pid_list, pull_pid_from_list): New.
8235 (handle_extended_wait): Don't assume the first signal new children
8236 report is SIGSTOP. Adjust call to pull_pid_from_list.
8237 (linux_wait_for_lwp): Adjust.
8239 2012-03-02 Yao Qi <yao@codesourcery.com>
8241 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8244 2012-03-02 Yao Qi <yao@codesourcery.com>
8246 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8247 `stop_pc' and `tpoint'. Update caller.
8249 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8251 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8252 * linux-low.c (use_linux_regsets): New macro.
8253 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8254 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8255 (linux_register_in_regsets): New function.
8256 (usr_fetch_inferior_registers): Skip registers covered by
8258 (usr_store_inferior_registers): Likewise.
8259 (usr_fetch_inferior_registers): New macro.
8260 (usr_store_inferior_registers): Likewise.
8261 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8262 (linux_store_registers): Likewise.
8263 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8265 (init_registers_mips64_dsp_linux): Likewise.
8266 (init_registers_mips_linux): New macro.
8267 (init_registers_mips_dsp_linux): Likewise.
8268 (mips_dsp_num_regs): Likewise.
8269 (DSP_BASE, DSP_CONTROL): New fallback macros.
8270 (mips_base_regs): New macro.
8271 (mips_regmap): Use it. Fix the size.
8272 (mips_dsp_regmap): New variable.
8273 (mips_dsp_regset_bitmap): Likewise.
8274 (mips_arch_setup): New function.
8275 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8277 (mips_cannot_store_register): Likewise.
8278 (the_low_target): Update .arch_setup, .num_regs and .regmap
8279 initializers. Add .regset_bitmap initializer.
8280 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8282 * linux-bfin-low.c (the_low_target): Likewise.
8283 * linux-cris-low.c (the_low_target): Likewise.
8284 * linux-crisv32-low.c (the_low_target): Likewise.
8285 * linux-ia64-low.c (the_low_target): Likewise.
8286 * linux-m32r-low.c (the_low_target): Likewise.
8287 * linux-m68k-low.c (the_low_target): Likewise.
8288 * linux-ppc-low.c (the_low_target): Likewise.
8289 * linux-s390-low.c (the_low_target): Likewise.
8290 * linux-sh-low.c (the_low_target): Likewise.
8291 * linux-sparc-low.c (the_low_target): Likewise.
8292 * linux-tic6x-low.c (the_low_target): Likewise.
8293 * linux-x86-low.c (the_low_target): Likewise.
8294 * linux-xtensa-low.c (the_low_target): Likewise.
8295 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8296 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8297 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8299 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8300 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8302 2012-02-29 Yao Qi <yao@codesourcery.com>
8303 Pedro Alves <palves@redhat.com>
8305 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8306 `step_over_finished' is true.
8308 2012-02-27 Pedro Alves <palves@redhat.com>
8310 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8311 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8313 2012-02-27 Pedro Alves <palves@redhat.com>
8316 * linux-low.c (pid_is_stopped): New.
8317 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8319 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8321 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8324 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8326 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8328 2012-02-24 Luis Machado <lgustavo@codesourcery>
8330 * server.c (handle_query): Advertise support for target-side
8331 breakpoint condition evaluation.
8332 (process_point_options): New function.
8333 (process_serial_event): When inserting a breakpoint, check for
8334 a target-side condition that should be evaluated.
8336 * mem-break.c: Include regcache.h and ax.h.
8337 (point_cond_list_t): New data structure.
8338 (breakpoint) <cond_list>: New field.
8339 (find_gdb_breakpoint_at): Make non-static.
8340 (delete_gdb_breakpoint_at): Clear any target-side
8342 (clear_gdb_breakpoint_conditions): New function.
8343 (add_condition_to_breakpoint): Likewise.
8344 (add_breakpoint_condition): Likewise.
8345 (gdb_condition_true_at_breakpoint): Likewise.
8346 (gdb_breakpoint_here): Return result directly instead
8347 of going through a local variable.
8349 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8350 (clear_gdb_breakpoint_conditions): Likewise.
8351 (add_breakpoint_condition): Likewise.
8352 (gdb_condition_true_at_breakpoint): Likewise.
8354 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8355 (need_step_over_p): Take target-side breakpoint condition into
8358 2012-02-24 Luis Machado <lgustavo@codesourcery>
8360 * server.h: Include tracepoint.h.
8361 (agent_mem_read, agent_get_trace_state_variable_value,
8362 agent_set_trace_state_variable_value,
8363 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8364 get_set_tsv_func_addr): New prototypes.
8366 * ax.h: New include file.
8367 * ax.c: New source file.
8369 * tracepoint.c: Include ax.h.
8370 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8371 agent_expr, eval_result_type): Move to ax.h.
8372 (parse_agent_expr): Rename to ...
8373 (gdb_parse_agent_expr): ... this, make it non-static and move
8375 (unparse_agent_expr) Rename to ...
8376 (gdb_unparse_agent_expr): ... this, make it non-static and move
8378 (eval_agent_expr): Rename to ...
8379 (eval_tracepoint_agent_expr): ... this.
8380 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8381 forward declarations.
8382 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8383 (agent_get_trace_state_variable_value): New function.
8384 (agent_set_trace_state_variable_value): New function.
8385 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8386 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8387 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8388 (condition_true_at_tracepoint): Likewise.
8389 (parse_agent_expr): Rename to ...
8390 (gdb_parse_agent_expr): ... this and move to ax.c.
8391 (unparse_agent_expr): Rename to ...
8392 (gdb_unparse_agent_expr): ... this and move to ax.c.
8393 (gdb_agent_op_name): Move to ax.c.
8394 (eval_agent_expr): Rename to ...
8395 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8397 (eval_tracepoint_agent_expr): New function.
8398 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8400 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8402 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8403 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8404 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8405 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8406 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8407 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8408 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8409 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8410 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8411 (compile_bytecodes): Remove forward declaration.
8412 (is_goto_target): Move to ax.c.
8413 (compile_bytecodes): Move to ax.c and call
8414 agent_get_trace_state_variable_value (...) and
8415 agent_set_trace_state_variable_value (...).
8417 * Makefile.in: Update ax.c and IPA dependencies.
8419 2012-02-24 Pedro Alves <palves@redhat.com>
8421 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8422 (cmd_bigqtbuffer_circular): ... this. Only handle
8423 'QTBuffer:circular:'.
8424 (handle_tracepoint_general_set): Adjust.
8426 2012-02-16 Yao Qi <yao@codesourcery.com>
8428 * inferiors.c: Move code to ...
8429 * dll.c: .... here. New.
8430 * server.h: Declare clear_dlls.
8431 * Makefile.in (SFILES): Add dll.c.
8435 2012-02-11 Yao Qi <yao@codesourcery.com>
8437 * server.c: (handle_monitor_command): Add a new parameter
8439 (handle_query): Update caller.
8441 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8443 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8444 * configure, config.in: Regenerate.
8445 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8448 2012-02-02 Pedro Alves <palves@redhat.com>
8450 Try SIGKILL first, then PTRACE_KILL.
8451 * linux-low.c (linux_kill_one_lwp): New.
8452 (linux_kill_one_lwp): Rename to ...
8453 (kill_one_lwp_callback): ... this. Use the new
8456 2012-02-02 Pedro Alves <palves@redhat.com>
8458 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8461 2012-01-27 Pedro Alves <palves@redhat.com>
8463 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8464 (elf_64_file_p): Make static.
8465 (linux_pid_exe_is_elf_64_file): New.
8466 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8467 Delete declarations.
8468 (linux_pid_exe_is_elf_64_file): Declare.
8469 * linux-x86-low.c (x86_arch_setup): Use
8470 linux_pid_exe_is_elf_64_file.
8472 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8474 * linux-low.c (linux_wait_for_event_1): Rename to ...
8475 (linux_wait_for_event): ... here and merge it with former
8476 linux_wait_for_event - new variable wait_ptid, use it.
8477 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8479 2012-01-23 Pedro Alves <palves@redhat.com>
8481 * server.c (main): Avoid yet another case of infinite loop while
8482 detaching/killing after a longjmp.
8484 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8487 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8489 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8491 * hostio.c (handle_readlink): New function.
8492 (handle_vFile): Call it to handle "vFile:readlink" packets.
8494 2012-01-20 Pedro Alves <palves@redhat.com>
8495 Ulrich Weigand <ulrich.weigand@linaro.org>
8497 * server.c (handle_v_requests): Only support vAttach and vRun to
8498 start multiple processes when in extended protocol mode.
8500 2012-01-17 Pedro Alves <palves@redhat.com>
8502 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8503 memalign plus mprotect to allocate the scratch buffer.
8505 2012-01-13 Pedro Alves <palves@redhat.com>
8507 * server.c (attach_inferior): Clear `cont_thread'.
8509 2012-01-13 Pedro Alves <palves@redhat.com>
8511 * server.c (main): Avoid infinite loop while detaching/killing
8514 2012-01-09 Doug Evans <dje@google.com>
8516 * server.c (start_inferior): Set last_ptid in --wrapper case.
8518 2012-01-06 Yao Qi <yao@codesourcery.com>
8520 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8522 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8524 2012-01-04 Yao Qi <yao@codesourcery.com>
8526 * tracepoint.c (cmd_qtdp): Print debug message
8527 for static tracepoint.
8529 2012-01-04 Yao Qi <yao@codesourcery.com>
8531 * tracepoint.c (trace_vdebug): Differentiate debug message
8532 between gdbserver and IPA.
8534 2012-01-03 Yao Qi <yao@codesourcery.com>
8536 * tracepoint.c (tracepoint_was_hit): Don't collect for
8539 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8541 * terminal.h: Reformat copyright header.
8543 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8545 * server.c (gdbserver_version): Update copyright year.
8546 * gdbreplay.c (gdbreplay_version): Likewise.
8548 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8550 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8553 2011-12-18 Hui Zhu <teawater@gmail.com>
8554 * linux-low.c (linux_create_inferior): Save return value to ret.
8556 2011-12-18 Hui Zhu <teawater@gmail.com>
8558 * linux-low.c (linux_create_inferior): Save return value to ret.
8560 2011-12-16 Doug Evans <dje@google.com>
8562 * linux-low.c (linux_create_inferior): If stdio connection,
8563 redirect stdin from /dev/null, stdout to stderr.
8564 * remote-utils.c (remote_is_stdio): New static global.
8565 (remote_connection_is_stdio): New function.
8566 (remote_prepare): Handle stdio connection.
8567 (remote_open): Ditto.
8568 (remote_close): Don't close stdin for stdio connections.
8569 (read_prim,write_prim): New functions. Replace all calls to
8570 read/write to these.
8571 * server.c (main): Watch for "-" argument. Move call to
8572 remote_prepare before start_inferior.
8573 * server.h (STDIO_CONNECTION_NAME): New macro.
8574 (remote_connection_is_stdio): Declare.
8576 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8577 in debugging output.
8579 2011-12-15 Yao Qi <yao@codesourcery.com>
8581 * tracepoint.c: Include sys/syscall.h.
8582 (gdb_ust_thread): Remove preprocessor conditional.
8584 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8586 * linux-low.c (linux_detach_one_lwp): Call
8587 the_low_target.prepare_to_resume before detaching.
8589 2011-12-14 Yao Qi <yao@codesourcery.com>
8591 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8594 2011-12-14 Yao Qi <yao@codesourcery.com>
8596 * i386-low.c (i386_low_stopped_data_address): Initialize local
8599 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8603 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8604 DR_CONTROL unless necessary. Extend comments.
8605 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8606 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8608 2011-12-13 Yao Qi <yao@codesourcery.com>
8610 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8612 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8614 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8616 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8617 Print new debug message for such case.
8619 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8621 Fix overlapping memcpy.
8622 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8623 the read_inferior_memory transfer.
8624 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8625 write_inferior_memory transfer.
8626 (set_fast_tracepoint_jump): New variable buf. Use it for the
8627 read_inferior_memory and write_inferior_memory transfers.
8628 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8629 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8630 Use it for the write_inferior_memory transfer.
8631 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8634 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8636 * linux-low.c (fetch_register, store_register): Make code
8637 consistent, fix formatting.
8639 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8641 * linux-low.c (usr_store_inferior_registers): Factor out code
8642 to handle individual registers into...
8643 (store_register): ... this new function.
8645 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8647 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8648 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8649 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8650 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8651 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8652 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8653 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8654 (srv_xmlfiles): Add new XML files.
8656 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8658 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8659 (init_registers_s390_linux32v1): Add prototype.
8660 (init_registers_s390_linux32v2): Likewise.
8661 (init_registers_s390_linux64v1): Likewise.
8662 (init_registers_s390_linux64v2): Likewise.
8663 (init_registers_s390x_linux64v1): Likewise.
8664 (init_registers_s390x_linux64v2): Likewise.
8665 (s390_num_regs): Increment to 52.
8666 (s390_regmap): Add orig_r2 register.
8667 (s390_num_regs_3264): Increment to 68.
8668 (s390_regmap_3264): Add orig_r2 register.
8669 (s390_collect_ptrace_register): Handle orig_r2 register.
8670 (s390_supply_ptrace_register): Likewise.
8671 (s390_fill_last_break): New function.
8672 (s390_store_last_break): Likewise.
8673 (s390_fill_system_call): New function.
8674 (s390_store_system_call): Likewise.
8675 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8677 (s390_check_regset): New function.
8678 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8679 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8680 Update target_regsets for available register sets.
8682 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8683 Jan Kratochvil <jan.kratochvil@redhat.com>
8685 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8686 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8688 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8689 * linux-low.h (struct process_info_private): New member r_debug.
8690 * server.c (handle_qxfer_libraries): Call
8691 the_target->qxfer_libraries_svr4.
8692 (handle_qxfer_libraries_svr4): New function.
8693 (qxfer_packets): New entry "libraries-svr4".
8694 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8695 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8696 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8697 PACKET_qXfer_libraries_svr4.
8699 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8701 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8702 PSW address/mask between 8-byte and 16-byte formats.
8703 (s390_supply_ptrace_register): Likewise.
8704 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8705 basic addressing mode bit.
8707 2011-11-24 Stan Shebs <stan@codesourcery.com>
8709 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8711 2011-11-17 Stan Shebs <stan@codesourcery.com>
8713 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8714 (tracing_start_time): New global.
8715 (tracing_stop_time): New global.
8716 (tracing_user_name): New global.
8717 (tracing_notes): New global.
8718 (tracing_stop_note): New global.
8719 (cmd_qtstart): Set traceframe_usage, start_time.
8720 (stop_tracing): Set stop_time.
8721 (cmd_qtstatus): Report additional status.
8722 (cmd_qtp): New function.
8723 (handle_tracepoint_query): Call it.
8724 (cmd_qtnotes): New function.
8725 (handle_tracepoint_general_set): Call it.
8726 (get_timestamp): Rename from tsv_get_timestamp.
8728 2011-11-14 Stan Shebs <stan@codesourcery.com>
8729 Kwok Cheung Yeung <kcy@codesourcery.com>
8731 * linux-x86-low.c (small_jump_insn): New.
8732 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8733 trampoline and error message, build a trampoline and issue a small
8734 jump instruction to it.
8735 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8736 trampoline and error message.
8737 (x86_get_min_fast_tracepoint_insn_len): New.
8738 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8739 * linux-low.h (struct linux_target_ops): Add arguments to
8740 install_fast_tracepoint_jump_pad operation, add new operation.
8741 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8743 (linux_get_min_fast_tracepoint_insn_len): New function.
8744 (linux_target_op): Add new operation.
8745 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8746 (gdb_trampoline_buffer_end): Ditto.
8747 (gdb_trampoline_buffer_error): Ditto.
8748 (struct ipa_sym_addresses): Add fields for new IPA variables.
8749 (symbol_list): Add entries for new IPA variables.
8750 (struct tracepoint): Add fields to hold the address range of the
8751 trampoline used by the tracepoint.
8752 (trampoline_buffer_head): New static variable.
8753 (trampoline_buffer_tail): Ditto.
8754 (claim_trampoline_space): New function.
8755 (have_fast_tracepoint_trampoline_buffer): New function.
8756 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8758 (install_fast_tracepoint): Ditto, also add error buffer argument.
8759 (cmd_qtminftpilen): New function.
8760 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8761 (fast_tracepoint_from_trampoline_address): New function.
8762 (fast_tracepoint_collecting): Handle trampoline as part of jump
8764 (set_trampoline_buffer_space): New function.
8765 (initialize_tracepoint): Initialize new IPA variables.
8766 * target.h (struct target_ops): Add arguments to
8767 install_fast_tracepoint_jump_pad operation, add new
8768 get_min_fast_tracepoint_insn_len operation.
8769 (target_get_min_fast_tracepoint_insn_len): New.
8770 (install_fast_tracepoint_jump_pad): Add arguments.
8771 * server.h (IPA_BUFSIZ): Define.
8772 * linux-i386-ipa.c: Include extra header files.
8773 (initialize_fast_tracepoint_trampoline_buffer): New function.
8774 (initialize_low_tracepoint): Call it.
8775 * server.h (set_trampoline_buffer_space): Declare.
8776 (claim_trampoline_space): Ditto.
8777 (have_fast_tracepoint_trampoline_buffer): Ditto.
8779 2011-11-14 Yao Qi <yao@codesourcery.com>
8781 * server.c (handle_query): Handle InstallInTrace for qSupported.
8782 * tracepoint.c (add_tracepoint): Sort list.
8783 (install_tracepoint, download_tracepoint): New.
8784 (cmd_qtdp): Call them to install and download tracepoints.
8785 (sort_tracepoints): Removed.
8786 (cmd_qtstart): Update.
8788 2011-11-14 Yao Qi <yao@codesourcery.com>
8790 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8791 * mem-break.h: Declare.
8792 * tracepoint.c (cmd_qtstart): Move some code to ...
8793 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8795 (download_tracepoints): Move some code to ...
8796 (download_tracepoint_1): ... here. New.
8798 2011-11-08 Yao Qi <yao@codesourcery.com>
8800 * remote-utils.c (relocate_instruction): A comment fix.
8802 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8804 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8805 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8806 dr_status_mirror and dr_control_mirror from debug_reg_state.
8807 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8808 (i386_initial_stuff): Remove use of deleted globals.
8809 (i386_get_thread_context, i386_set_thread_context,
8810 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8811 from debug_reg_state.
8813 2011-11-05 Yao Qi <yao@codesourcery.com>
8815 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8816 address as TPOINT's.
8818 2011-11-02 Stan Shebs <stan@codesourcery.com>
8820 * tracepoint.c (agent_mem_read_string): New function.
8821 (eval_agent_expr): Call it for tracenz.
8822 * server.c (handle_query): Report support for tracenz.
8824 2011-11-02 Yao Qi <yao@codesourcery.com>
8826 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8828 2011-11-02 Yao Qi <yao@codesourcery.com>
8830 * target.h: Fix a typo in comment.
8832 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8834 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8835 clobber the breakpoints' shadows with fast tracepoint jumps.
8836 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8837 * target.c (write_inferior_memory): Also pass MYADDR down to
8840 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8842 * configure.ac: Check support for personality routine.
8843 * configure: Regenerate.
8844 * config.in: Likewise.
8845 * linux-low.c: Include <sys/personality.h>.
8846 Define ADDR_NO_RANDOMIZE if necessary.
8847 (linux_create_inferior): Disable address space randomization when
8848 forking inferior, if requested.
8849 (linux_supports_disable_randomization): New function.
8850 (linux_target_ops): Install it.
8851 * server.h (disable_randomization): Declare.
8852 * server.c (disable_randomization): New global variable.
8853 (handle_general_set): Handle QDisableRandomization.
8854 (handle_query): Likewise for qSupported.
8855 (main): Support --disable-randomization and --no-disable-randomization
8856 command line arguments.
8857 * target.h (struct target_ops): Add supports_disable_randomization.
8858 (target_supports_disable_randomization): New macro.
8860 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8862 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8864 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8865 [!PT_GETDSBT] (target_loadmap): New definition.
8866 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8867 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8868 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8869 and PT_GETDSBT to LINUX_LOADMAP.
8870 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8871 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8873 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8875 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8876 (arm_linux_hwbp_cap): New static variable.
8877 (arm_linux_get_hwbp_cap): Replace by ...
8878 (arm_linux_init_hwbp_cap): ... this new function.
8879 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8880 (arm_linux_get_hw_watchpoint_count): Likewise.
8881 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8882 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8883 (arm_prepare_to_resume): Use perror_with_name instead of error.
8885 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8887 * linux-arm-low.c: Include <signal.h>.
8888 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8889 (struct arm_linux_hwbp_cap): New data type.
8890 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8891 (struct arm_linux_hw_breakpoint): New data type.
8892 (MAX_BPTS, MAX_WPTS): Define.
8893 (struct arch_process_info, struct arch_lwp_info): New data types.
8894 (arm_linux_get_hwbp_cap): New function.
8895 (arm_linux_get_hw_breakpoint_count): Likewise.
8896 (arm_linux_get_hw_watchpoint_count): Likewise.
8897 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8898 (arm_hwbp_control_initialize): Likewise.
8899 (arm_hwbp_control_is_enabled): Likewise.
8900 (arm_hwbp_control_is_initialized): Likewise.
8901 (arm_hwbp_control_disable): Likewise.
8902 (arm_linux_hw_breakpoint_equal): Likewise.
8903 (arm_linux_hw_point_initialize): Likewise.
8904 (struct update_registers_data): New data structure.
8905 (update_registers_callback: New function.
8906 (arm_insert_point): Likewise.
8907 (arm_remove_point): Likewise.
8908 (arm_stopped_by_watchpoint): Likewise.
8909 (arm_stopped_data_address): Likewise.
8910 (arm_new_process): Likewise.
8911 (arm_new_thread): Likewise.
8912 (arm_prepare_to_resume): Likewise.
8913 (the_low_target): Register arm_insert_point, arm_remove_point,
8914 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8915 arm_new_thread, and arm_prepare_to_resume.
8917 2011-09-15 Stan Shebs <stan@codesourcery.com>
8919 * server.h (struct emit_ops): Add compare-goto fields.
8920 * tracepoint.c (gdb_agent_op_sizes): New table.
8921 (emit_eq_goto): New function.
8922 (emit_ne_goto): New function.
8923 (emit_lt_goto): New function.
8924 (emit_le_goto): New function.
8925 (emit_gt_goto): New function.
8926 (emit_ge_goto): New function.
8927 (is_goto_target): New function.
8928 (compile_bytecodes): Recognize special cases of compare-goto
8929 combinations and call specialized emitters for them.
8930 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8931 (amd64_emit_ne_goto): New function.
8932 (amd64_emit_lt_goto): New function.
8933 (amd64_emit_le_goto): New function.
8934 (amd64_emit_gt_goto): New function.
8935 (amd64_emit_ge_goto): New function.
8936 (amd64_emit_ops): Add the new functions.
8937 (i386_emit_eq_goto): New function.
8938 (i386_emit_ne_goto): New function.
8939 (i386_emit_lt_goto): New function.
8940 (i386_emit_le_goto): New function.
8941 (i386_emit_gt_goto): New function.
8942 (i386_emit_ge_goto): New function.
8943 (i386_emit_ops): Add the new functions.
8945 2011-09-08 Stan Shebs <stan@codesourcery.com>
8947 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8948 (i386_emit_epilogue): Restore %ebx.
8950 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8952 * server.c (step_thread): Remove definition.
8953 (process_serial_event): Don't handle Hs.
8954 * server.h (step_thread): Remove declaration.
8955 * target.c (set_desired_inferior): Remove use of step_thread.
8957 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8959 * linux-low.c: Include linux-procfs.h.
8960 (linux_attach_lwp_1): Update comments.
8961 (linux_attach): Scan for existing threads when attaching to a
8962 process that is the tgid.
8963 * Makefile.in: Update dependencies.
8965 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8967 * configure.srv: Add linux-procfs.o dependencies.
8969 2011-08-14 Yao Qi <yao@codesourcery.com>
8971 * target.h (struct target_ops): Fix indent.
8972 * win32-low.c (win32_target_ops): Fix comment.
8974 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8975 Yao Qi <yao@codesourcery.com>
8977 * Makefile.in (clean): Remove tic6x-*.c files.
8978 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8979 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8980 (tic6x-c64xp-linux.c): Likewise.
8981 * configure.srv: Add support for tic6x-*-uclinux.
8982 * linux-tic6x-low.c: New.
8983 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8985 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8986 Yao Qi <yao@codesourcery.com>
8988 * target.h (struct target_ops): Add read_loadmap.
8989 * linux-low.c (struct target_loadseg): New type.
8990 (struct target_loadmap): New type.
8991 (linux_read_loadmap): New function.
8992 (linux_target_ops): Add linux_read_loadmap.
8993 * server.c (handle_query): Support qXfer:fdpic:read packet.
8994 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8997 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8999 * win32-low.c: Include <stdint.h>.
9001 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9003 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9004 to the inferior here.
9005 (i386_remove_aligned_watchpoint): Ditto.
9006 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9007 fit part of the watchpoint in the debug registers.
9008 (i386_update_inferior_debug_regs): New.
9009 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9010 registers, and only update the inferior on success.
9011 (i386_low_remove_watchpoint): Ditto.
9013 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9015 * linux-low.c (compare_ints, unique, list_threads, show_process,
9016 linux_core_of_thread): Delete.
9017 (linux_target_ops): Change linux_core_of_thread to
9018 linux_common_core_of_thread.
9019 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9020 * utils.c (malloc_failure): Change type of argument.
9021 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9022 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9023 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9024 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9025 (IPA_OBJS): Add common-utils-ipa.o.
9026 (ptid_h, linux_osdata_h): New macros.
9027 (server_h): Add common/common-utils.h, common/xml-utils.h,
9028 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9030 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9031 ptid.o, buffer.o): New rules.
9032 (linux-low.o): Add common/linux-osdata.h as a dependency.
9033 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9034 * configure.ac: Add AC_HEADER_DIRENT check.
9035 * config.in: Regenerate.
9036 * configure: Regenerate.
9037 * remote-utils.c (xml_escape_text): Delete.
9038 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9039 buffer_xml_printf): Move to common/buffer.c.
9040 * server.c (main): Remove call to initialize_inferiors.
9041 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9042 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9043 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9044 internal_error, gdb_assert, gdb_assert_fail): Delete.
9045 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9046 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9048 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9049 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9050 initialize_inferiors): Delete.
9052 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9054 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9057 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9059 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9061 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9063 2011-05-26 Yao Qi <yao@codesourcery.com>
9065 * Makefile.in (thread-db.o): Track dependence to
9066 common/gdb_thread_db.h.
9067 * thread-db.c: include gdb_thread_db.h from right place.
9069 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9071 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9072 __FILE__ and __LINE__ to internal_error.
9074 2011-05-13 Doug Evans <dje@google.com>
9076 * thread-db.c (try_thread_db_load_from_sdir): New function.
9077 (try_thread_db_load_from_dir): New function.
9078 (thread_db_load_search): Handle $sdir, ignore $pdir.
9079 Remove trying of system directories if search of
9080 libthread-db-search-path fails, that is now done via $sdir.
9082 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9084 * server.c (handle_query): Add EnableDisableTracepoints to the list
9085 of supported features.
9086 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9088 (cmd_qtenable_disable): New.
9089 (cmd_qtstart): Install tracepoints even if disabled.
9090 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9091 receiving a QTEnable or QTDisable packet.
9092 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9093 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9095 (gdb_probe): Skip data collection if static tracepoint is disabled.
9097 2011-05-10 Doug Evans <dje@google.com>
9099 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9101 2011-05-04 Doug Evans <dje@google.com>
9103 * linux-low.c (linux_join): Skip process lookup.
9104 * spu-low.c (spu_join): Ditto.
9105 * server.c (join_inferiors_callback): Delete.
9106 (process_serial_event): For 'D' packet (detach) call join_inferior
9109 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9111 * README: Don't mention xscale*-*-linux*.
9112 * configure.srv (xscale*-*-linux*): Don't handle target.
9114 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9116 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9118 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9119 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9120 (i386_emit_void_call_2): Likewise.
9122 2011-04-26 Yao Qi <yao@codesourcery.com>
9124 * linux-low.c: Move common macros to linux-ptrace.h.
9125 Include linux-ptrace.h.
9126 * Makefile.in (linux_ptrace_h): New.
9127 (linux-low.o): Depends on linux-ptrace.h.
9129 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9131 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9132 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9133 (remote_prepare): New function with most of the TCP code from ...
9134 (remote_open): ... here. Detect PORT here unconditionally. Move also
9135 setting transport_is_reliable.
9136 * server.c (run_once): New variable.
9137 (gdbserver_usage): Document it.
9138 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9139 the first run if RUN_ONCE.
9140 * server.h (run_once, remote_prepare): New declarations.
9142 2011-04-19 Tom Tromey <tromey@redhat.com>
9144 * win32-low.c (handle_load_dll): Remove duplicate "the".
9146 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9148 Remove support for old Cygwin 1.5 versions.
9149 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9150 function to avoid warning.
9151 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9154 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9156 * gdbserver/server.h (Macro _): Define it if not available.
9158 2011-03-14 Michael Snyder <msnyder@vmware.com>
9160 * hostio.c (handle_close): Remove unnecessary null test.
9162 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9164 * Makefile.in (maintainer-clean realclean distclean): Remove
9165 "make ... subdir_do" command.
9167 2011-03-10 Michael Snyder <msnyder@vmware.com>
9169 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9171 * server.c (handle_v_run): Free alloced buffer on early return.
9173 2011-03-09 Yao Qi <yao@codesourcery.com>
9176 2011-03-04 Yao Qi <yao@codesourcery.com>
9178 * Makefile.in: Remove GNU make feature --directory.
9180 2011-03-05 Yao Qi <yao@codesourcery.com>
9182 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9183 (subdir_do): New make target. Copied from gdb/Makefile.
9184 (maintainer-clean, realclean, distclean, clean): Call corresponding
9185 make targets in common/Makefile.
9187 2011-02-11 Yao Qi <yao@codesourcery.com>
9189 * configure.ac: Call AC_PROG_RANLIB.
9190 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9191 * configure: Regenerate.
9193 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9195 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9197 2011-03-06 Yao Qi <yao@codesourcery.com>
9199 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9201 2011-03-05 Yao Qi <yao@codesourcery.com>
9203 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9204 (subdir_do): New make target. Copied from gdb/Makefile.
9205 (maintainer-clean, realclean, distclean, clean): Call corresponding
9206 make targets in common/Makefile.
9208 2011-03-04 Yao Qi <yao@codesourcery.com>
9210 * Makefile.in: Remove GNU make feature --directory.
9212 2011-03-04 Michael Snyder <msnyder@vmware.com>
9214 * server.c (queue_stop_reply): Call xmalloc not malloc.
9216 2011-03-02 Michael Snyder <msnyder@vmware.com>
9218 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9220 2011-02-28 Michael Snyder <msnyder@vmware.com>
9222 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9223 (cmd_qtframe): Ditto.
9224 (cmd_qtbuffer): Ditto.
9225 (cmd_bigqtbuffer): Ditto.
9227 * utils.c (decimal2str): Initialize 'width' to nine, then
9230 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9232 * hostio.c (require_data): Free *data, not data.
9234 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9236 * hostio.c (require_data): Use free, not xfree.
9238 2011-02-27 Michael Snyder <msnyder@vmware.com>
9240 * server.c (handle_query): Discard unused value.
9242 * hostio.c (require_data): Free malloc memory before returning
9245 2011-02-26 Michael Snyder <msnyder@vmware.com>
9247 * linux-low.c (list_threads): Call closedir for dirent.
9249 2011-02-27 Michael Snyder <msnyder@vmware.com>
9251 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9252 a case statement falls through.
9254 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9256 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9259 2011-02-26 Michael Snyder <msnyder@vmware.com>
9261 * utils.c (decimal2str): Eliminate dead code and dead param.
9262 (pulongest): Drop dead param from call to decimal2str.
9265 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9267 Revert the following patch (not approved yet):
9268 2011-02-21 Hui Zhu <teawater@gmail.com>
9269 * tracepoint.c (tp_printf): New function.
9270 (eval_agent_expr): Handle gdb_agent_op_printf.
9272 2011-02-21 Hui Zhu <teawater@gmail.com>
9274 * tracepoint.c (tp_printf): New function.
9275 (eval_agent_expr): Handle gdb_agent_op_printf.
9277 2011-02-18 Tom Tromey <tromey@redhat.com>
9279 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9280 (tracepoint.o): Likewise.
9281 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9282 (gdb_agent_op_names): Likewise.
9284 2011-02-18 Tom Tromey <tromey@redhat.com>
9286 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9287 gdb_agent_op_rot>: New constants.
9288 (gdb_agent_op_names): Add pick and roll.
9289 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9292 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9294 * aclocal.m4: Regenerated with aclocal-1.11.1.
9296 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9298 * server.c (handle_qxfer_traceframe_info): New.
9299 (qxfer_packets): Register "traceframe-info".
9300 (handle_query): Report support for qXfer:traceframe-info:read+.
9301 * tracepoint.c (match_blocktype): New.
9302 (traceframe_find_block_type): Rename to ...
9303 (traceframe_walk_blocks): ... this. Add callback filter argument,
9305 (traceframe_find_block_type): New, reimplemented on top of
9306 traceframe_walk_blocks.
9307 (build_traceframe_info_xml): New.
9308 (traceframe_read_info): New.
9309 * server.h (traceframe_read_info): Declare.
9311 2011-02-11 Yao Qi <yao@codesourcery.com>
9313 * configure.ac: Call AC_PROG_RANLIB.
9314 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9315 * configure: Regenerate.
9317 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9319 * server.c (gdb_read_memory): Change return semantics to allow
9321 (handle_search_memory_1): Adjust.
9322 (process_serial_event) <'m' packet>: Handle partial transfers.
9323 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9325 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9327 * regcache.c (init_register_cache): Initialize
9328 regcache->register_status.
9329 (free_register_cache): Release regcache->register_status.
9330 (regcache_cpy): Copy register_status.
9331 (registers_to_string): Print 'x's for unavailable registers.
9332 (supply_register): Mark the register's status valid or
9333 unavailable, depending on whether a buffer was passed in or not.
9334 (supply_register_zeroed): New.
9335 (supply_regblock): Mark the registers' status valid or
9336 unavailable, depending on whether a buffer was passed in or not.
9337 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9338 (struct regcache): New `register_status' field.
9339 (supply_register_zeroed): Declare.
9340 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9341 supply_register_zeroed, rather than passing a NULL buffer to
9343 * tracepoint.c (fetch_traceframe_registers): Update comment.
9345 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9347 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9350 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9352 * server.h (decode_xfer_write): Change prototype.
9353 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9354 and don't extract the annex here.
9355 * server.c (decode_xfer_read): Remove `annex' parameter,
9356 and don't extract the annex here.
9358 (struct qxfer): New.
9359 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9360 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9361 (handle_qxfer_statictrace): New functions, abstracted out from
9362 handle_query, and made to use the struct qxfer interface.
9363 (handle_threads_qxfer_proper): Rename to ...
9364 (handle_qxfer_threads_proper): ... this.
9365 (handle_threads_qxfer): Rename to ...
9366 (handle_qxfer_threads): ... this. Adjust.
9367 (qxfer_packets): New array.
9368 (handle_qxfer): New function.
9369 (handle_query): Use handle_qxfer.
9371 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9373 * gdbreplay.c: Shorten lines of >= 80 columns.
9374 * linux-low.c: Ditto.
9375 * linux-ppc-low.c: Ditto.
9376 * linux-s390-low.c: Ditto.
9377 * linux-sparc-low.c: Ditto.
9378 * linux-x86-low.c: Ditto.
9379 * linux-xtensa-low.c: Ditto.
9380 * mem-break.c: Ditto.
9382 * regcache.h: Ditto.
9383 * remote-utils.c: Ditto.
9386 * thread-db.c: Ditto.
9387 * tracepoint.c: Ditto.
9389 * win32-low.h: Ditto.
9391 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9393 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9396 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9398 * server.c (gdbserver_version): Update copyright year in version
9400 * gdbreplay.c (gdbreplay_version): Ditto.
9402 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9404 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9405 * linux-bfin-low.c: New file.
9406 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9407 PT_DATA_ADDR for BFIN targets.
9408 * Makefile.in (SFILES): Add linux-bfin-low.c.
9409 (clean): Remove reg-bfin.c.
9410 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9411 * README: Mention supported Blackfin targets.
9413 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9415 * .gitignore: New file.
9417 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9419 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9421 2010-10-22 Jie Zhang <jie@codesourcery.com>
9423 * Makefile.in: Add FLAGS_TO_PASS variable.
9424 (install): Remove dependency of install-only and recursively
9425 invoke make for install-only.
9427 2010-10-04 Doug Evans <dje@google.com>
9429 * Makefile.in (uninstall): Use $(DESTDIR).
9431 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9435 * linux-x86-low.c (compat_siginfo_from_siginfo)
9436 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9437 si_code is < 0. Check for si_code == SI_TIMER before checking for
9440 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9442 * lynx-i386-low.c: New file.
9443 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9445 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9447 * lynx-low.c (ptrace_request_to_str): Remove handling for
9448 request values that have been removed in LynxOS 5.x.
9450 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9452 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9455 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9457 * configure.ac: Add --enable-inprocess-agent option.
9458 * configure: Rebuilt.
9460 2010-09-06 Yao Qi <yao@codesourcery.com>
9462 * linux-low.c (linux_kill): Remove unused variable.
9463 (linux_stabilize_threads): Likewise.
9464 * server.c (start_inferior): Likewise.
9465 (queue_stop_reply_callback): Likewise.
9466 * tracepoint.c (do_action_at_tracepoint): Likewise.
9468 2010-09-06 Yao Qi <yao@codesourcery.com>
9470 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9473 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9475 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9477 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9479 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9482 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9484 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9485 gdbserver/lynx-ppc-low.c: New files.
9486 * Makefile.in (lynx_low_h): New variable.
9487 (lynx-low.o, lynx-ppc-low.o): New rules.
9488 * configure.ac: On LynxOS, link with -lnetinet.
9489 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9490 * configure: regenerate.
9492 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9494 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9495 * configure.ac: Add check for vasprintf and vsnprintf.
9496 * configure, config.in: Regenerate.
9497 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9499 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9501 * gdbreplay.c: Move include of alloca.h up, next to include of
9503 * server.h: Add include of malloc.h.
9504 * mem-break.c: Remove include of malloc.h.
9505 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9507 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9509 * Makefile.in (memmem.o): Build with -Wno-error.
9511 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9513 * utils.c (xsnprintf): Make non-static.
9514 * server.h: Add xsnprintf declaration.
9515 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9516 replace calls to snprintf by calls to xsnprintf throughout.
9518 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9520 * configure.ac: Add configure check for alloca.
9521 * configure, config.in: Regenerate.
9522 * server.h: Include alloca.h if it exists.
9523 * gdbreplay.c: Include alloca.h if it exists.
9525 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9527 * linux-low.c (__SIGRTMIN): Define if not already defined.
9528 (linux_create_inferior): Check for __ANDROID__ rather than
9530 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9531 are already deferred.
9532 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9533 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9534 stopped and already has a pending signal to report.
9535 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9536 a pending signal to report or is moving out of a jump pad.
9537 (linux_init_signals): Check for __ANDROID__ rather than
9540 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9542 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9543 debug_threads check. Avoid a linear search when not doing debug
9546 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9548 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9549 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9550 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9551 (process_event): Change local fd's type to gdb_fildes_t.
9552 (create_file_handler): Adjust prototype.
9553 (delete_file_handler): Adjust prototype.
9554 (handle_file_event): Adjust prototype. Use pfildes.
9555 (create_file_event): Adjsut prototype.
9556 * remote-utils.c (remote_desc, listen_desc): Change type to
9558 * server.h: New gdb_fildes_t typedef.
9559 [USE_WIN32API]: Include winsock2.h.
9560 (delete_file_handler, add_file_handler): Adjust prototypes.
9562 * utils.c (pfildes): New.
9564 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9566 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9567 * configure: Regenerate.
9569 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9571 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9572 (linux_done_accessing_memory): ... this.
9573 (linux_target_ops): Adjust.
9574 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9575 * nto-low.c (nto_target_ops): Adjust comment.
9576 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9577 * spu-low.c (spu_target_ops): Adjust comment.
9578 * target.h (target_ops): Rename unprepare_to_access_memory field
9579 to done_accessing_memory.
9580 (unprepare_to_access_memory): Rename to ...
9581 (done_accessing_memory): ... this.
9583 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9585 * linux-low.c (linux_prepare_to_access_memory): New.
9586 (linux_unprepare_to_access_memory): New.
9587 (linux_target_ops): Install them.
9588 * server.c (read_memory): Rename to ...
9589 (gdb_read_memory): ... this. Use
9590 prepare_to_access_memory/prepare_to_access_memory.
9591 (write_memory): Rename to ...
9592 (gdb_write_memory): ... this. Use
9593 prepare_to_access_memory/prepare_to_access_memory.
9594 (handle_search_memory_1): Adjust.
9595 (process_serial_event): Adjust.
9596 * target.h (struct target_ops): New fields
9597 prepare_to_access_memory and unprepare_to_access_memory.
9598 (prepare_to_access_memory, unprepare_to_access_memory): New.
9599 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9600 prepare_to_access_memory/prepare_to_access_memory.
9601 * nto-low.c (nto_target_ops): Adjust.
9602 * spu-low.c (spu_target_ops): Adjust.
9603 * win32-low.c (win32_target_ops): Adjust.
9605 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9607 * Makefile.in (WARN_CFLAGS): Get it from configure.
9608 (WERROR_CFLAGS): New.
9609 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9610 * configure.ac: Introduce --enable-werror, which adds -Werror to
9611 the compiler command line. Enabled by default. Disable with
9612 --disable-werror. Add -Wdeclaration-after-statement
9613 Wpointer-arith and -Wformat-nonliteral to warning flags.
9614 * configure: Regenerate.
9616 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9618 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9620 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9622 * gdbreplay.c (remote_error): New.
9624 (expect): Use gdbchar. Check for error reading from GDB.
9625 Clarify sync error output.
9626 (play): Check for errors writing to GDB.
9627 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9628 * remote-utils.c (getpkt): Check for errors writing to the remote
9631 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9633 * linux-low.c (linux_wait_1): Move non-debugging code out of
9634 `debug_threads' control.
9636 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9638 * linux-low.c (linux_wait_1): Don't set last_status here.
9639 * server.c (push_event, queue_stop_reply_callback): Assert we're
9640 not pushing a TARGET_WAITKIND_IGNORE event.
9641 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9642 (myresume, handle_target_event): Set the thread's last_resume_kind
9643 and last_status from the target returned status.
9645 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9649 * linux-x86-low.c (update_debug_registers_callback): New.
9650 (i386_dr_low_set_addr): Use it.
9651 (i386_dr_low_get_addr): New.
9652 (i386_dr_low_set_control): Use update_debug_registers_callback.
9653 (i386_dr_low_get_control): New.
9654 (i386_dr_low_get_status): Adjust.
9655 * linux-low.c (linux_stop_lwp): New.
9656 * linux-low.h (linux_stop_lwp): Declare.
9658 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9659 argument instead of a i386_debug_reg_state.
9660 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9661 a i386_debug_reg_state.
9662 (i386_insert_aligned_watchpoint): Adjust.
9663 (i386_remove_aligned_watchpoint): Adjust.
9664 (i386_low_stopped_data_address): Read the debug registers from the
9665 inferior instead of from the mirrors.
9666 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9667 (i386_dr_low_get_addr): Declare.
9668 (i386_dr_low_get_control): Declare.
9669 (i386_dr_low_get_status): Change prototype.
9671 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9672 (i386_dr_low_get_addr): New.
9673 (i386_dr_low_get_control): New.
9674 (i386_dr_low_get_status): Adjust prototype. Return
9676 (i386_initial_stuff): Clear dr_status_mirror and
9678 (i386_get_thread_context): Adjust.
9679 (i386_set_thread_context): Adjust.
9680 (i386_thread_added): Adjust.
9682 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9684 * linux-low.h (linux_thread_area): Delete declaration.
9686 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9688 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9689 after its termination.
9691 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9693 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9694 (gdb_wants_all_stopped): Delete.
9695 (linux_wait_1): Don't call them.
9696 * server.c (handle_v_cont): Tag all threads as want-stopped.
9697 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9698 stopped as "client-wants-stopped".
9700 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9702 * Makefile.in (signals_h): New.
9703 (server_h): Depend on it.
9704 (server.o): Don't depend on $(signals_def).
9705 (signals.o): Depend on $(signals_def).
9707 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9709 * Makefile.in (signals_def): New.
9710 (server_h): Append include/gdb/signals.h and signals_def.
9711 (server.o): Append signals_def.
9713 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9715 * server.c (handle_target_event): Use target_signal_to_host for
9716 resume_info.sig initialization.
9717 * target.h (struct thread_resume) <sig>: New comment.
9719 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9721 * server.c (handle_query): strcpy() the returned string from paddress()
9722 instead of sprintf().
9723 * utils.c (paddress): Return phex_nz().
9725 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9727 * server.c (handle_v_cont): Call mourn_inferior if process
9729 (myresume): Likewise.
9731 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9733 Static tracepoints, and integration with UST.
9735 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9736 * mem-break.c (uninsert_all_breakpoints)
9737 (reinsert_all_breakpoints): New.
9738 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9739 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9740 (gdb_agent_ust_loaded, helper_thread_id)
9741 (gdb_agent_helper_thread_id): New macros.
9742 (struct ipa_sym_addresses): Add addr_ust_loaded,
9743 addr_helper_thread_id, addr_cmd_buf.
9744 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9745 (in_process_agent_loaded_ust): New.
9746 (write_e_ust_not_loaded): New.
9747 (maybe_write_ipa_ust_not_loaded): New.
9748 (struct collect_static_trace_data_action): New.
9749 (enum tracepoint_type) <static_tracepoint>: New.
9750 (struct tracepoint) <handle>: Mention static tracepoints.
9751 (struct static_tracepoint_ctx): New.
9752 (CMD_BUF_SIZE): New.
9753 (add_tracepoint_action): Handle static tracepoint actions.
9754 (unprobe_marker_at): New.
9755 (clear_installed_tracepoints): Handle static tracepoints.
9756 (cmd_qtdp): Handle static tracepoints.
9757 (probe_marker_at): New.
9758 (cmd_qtstart): Handle static tracepoints.
9759 (response_tracepoint): Handle static tracepoints.
9760 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9761 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9762 (get_context_regcache): Handle static tracepoints.
9763 (do_action_at_tracepoint): Handle static tracepoint actions.
9764 (traceframe_find_block_type): Handle static trace data blocks.
9765 (traceframe_read_sdata): New.
9766 (download_tracepoints): Download static tracepoint actions.
9767 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9768 (GDB_PROBE_NAME): New.
9773 (ust_marker_to_static_tracepoint): New.
9775 (collect_ust_data_at_tracepoint): New.
9776 (gdb_ust_probe): New.
9777 (UNIX_PATH_MAX, SOCK_DIR): New.
9778 (gdb_ust_connect_sync_socket): New.
9779 (resume_thread, stop_thread): New.
9780 (run_inferior_command): New.
9781 (init_named_socket): New.
9782 (gdb_ust_socket_init): New.
9783 (cstr_to_hexstr): New.
9785 (first_marker, next_marker): New.
9786 (response_ust_marker): New.
9787 (cmd_qtfstm, cmd_qtsstm): New.
9788 (unprobe_marker_at, probe_marker_at): New.
9789 (cmd_qtstmat, gdb_ust_thread): New.
9790 (gdb_ust_init): New.
9791 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9792 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9794 (x86_64_st_collect_regmap): New.
9795 (X86_64_NUM_ST_COLLECT_GREGS): New.
9796 (AMD64_RIP_REGNUM): New.
9797 (supply_static_tracepoint_registers): New.
9798 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9800 (i386_st_collect_regmap): New.
9801 (i386_NUM_ST_COLLECT_GREGS): New.
9802 (supply_static_tracepoint_registers): New.
9803 * server.c (handle_query): Handle qXfer:statictrace:read.
9804 <qSupported>: Report support for StaticTracepoints, and
9805 qXfer:statictrace:read features.
9806 * server.h (traceframe_read_sdata)
9807 (supply_static_tracepoint_registers): Declare.
9808 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9809 (unpack_varlen_hex): Include in IPA build.
9810 * Makefile.in (ustlibs, ustinc): New.
9811 (IPA_OBJS): Add remote-utils-ipa.o.
9812 ($(IPA_LIB)): Link -ldl and -lpthread.
9814 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9815 * config.in, configure: Regenerate.
9817 2010-06-20 Ian Lance Taylor <iant@google.com>
9818 Pedro Alves <pedro@codesourcery.com>
9820 * linux-x86-low.c (always_true): Delete.
9821 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9822 trying to fool the compiler with always_true.
9824 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9826 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9827 conditions in gdbserver.
9829 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9831 * spu-low.c (spu_read_memory): Wrap around local store limit.
9832 (spu_write_memory): Likewise.
9834 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9836 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9837 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9839 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9841 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9842 uses with LONGEST uses.
9844 2010-06-14 Stan Shebs <stan@codesourcery.com>
9845 Pedro Alves <pedro@codesourcery.com>
9849 * linux-x86-low.c: Include limits.h.
9854 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9855 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9856 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9857 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9858 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9859 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9860 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9861 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9862 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9863 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9864 (amd64_emit_void_call_2): New.
9865 (amd64_emit_ops): New.
9866 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9867 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9868 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9869 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9870 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9871 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9872 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9873 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9874 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9875 (i386_emit_stack_adjust, i386_emit_int_call_1)
9876 (i386_emit_void_call_2): New.
9877 (i386_emit_ops): New.
9878 (x86_emit_ops): New.
9879 (the_low_target): Install x86_emit_ops.
9880 * server.h (struct emit_ops): New.
9881 (get_raw_reg_func_addr): Declare.
9882 (current_insn_ptr, emit_error): Declare.
9883 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9884 (set_trace_state_variable_value): New defines.
9885 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9886 addr_get_trace_state_variable_value and
9887 addr_set_trace_state_variable_value.
9888 (symbol_list): New fields for get_raw_reg,
9889 get_trace_state_variable_value and set_trace_state_variable_value.
9890 (condfn): New typedef.
9891 (struct tracepoint): New field `compiled_cond'.
9892 (do_action_at_tracepoint): Clear compiled_cond.
9893 (get_trace_state_variable_value, set_trace_state_variable_value):
9895 (condition_true_at_tracepoint): If there's a compiled condition,
9897 (current_insn_ptr, emit_error): New globals.
9898 (struct bytecode_address): New.
9899 (get_raw_reg_func_addr): New.
9900 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9901 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9902 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9903 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9904 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9905 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9906 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9907 (compile_tracepoint_condition, compile_bytecodes): New.
9908 * target.h (emit_ops): Forward declare.
9909 (struct target_ops): New field emit_ops.
9910 (target_emit_ops): New.
9911 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9912 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9913 * linux-low.c (linux_emit_ops): New.
9914 (linux_target_ops): Install it.
9915 * linux-low.h (struct linux_target_ops): New field emit_ops.
9917 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9919 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9920 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9922 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9923 Stan Shebs <stan@codesourcery.com>
9925 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9926 (all): Depend on $(extra_libraries).
9927 (install-only): Install the IPA.
9928 (IPA_OBJS, IPA_LIB): New.
9929 (clean): Remove the IPA lib.
9930 (IPAGENT_CFLAGS): New.
9931 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9932 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9933 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9934 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9935 * configure.ac: Check for atomic builtins support in the compiler.
9936 (IPA_DEPFILES, extra_libraries): Define.
9937 * configure.srv (ipa_obj): Add description.
9938 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9939 (i[34567]86-*-linux*): Set ipa_obj.
9940 (x86_64-*-linux*): Set ipa_obj.
9941 * linux-low.c (stabilizing_threads): New.
9942 (supports_fast_tracepoints): New.
9943 (linux_detach): Stabilize threads before detaching.
9944 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9945 the lwp is either not stabilizing, or is moving out of a jump pad.
9946 (linux_fast_tracepoint_collecting): New.
9947 (maybe_move_out_of_jump_pad): New.
9948 (enqueue_one_deferred_signal): New.
9949 (dequeue_one_deferred_signal): New.
9950 (linux_wait_for_event_1): If moving out of a jump pad, defer
9951 pending signals to later.
9952 (linux_stabilize_threads): New.
9953 (linux_wait_1): Check if threads need moving out of jump pads, and
9955 (stuck_in_jump_pad_callback): New.
9956 (move_out_of_jump_pad_callback): New.
9958 (linux_resume_one_lwp): Handle moving out of jump pads.
9959 (linux_set_resume_request): Dequeue deferred signals.
9960 (need_step_over_p): Also step over fast tracepoint jumps.
9961 (start_step_over): Also uninsert fast tracepoint jumps.
9962 (finish_step_over): Also reinsert fast tracepoint jumps.
9963 (linux_install_fast_tracepoint_jump): New.
9964 (linux_target_ops): Install linux_stabilize_threads and
9965 linux_install_fast_tracepoint_jump_pad.
9966 * linux-low.h (linux_target_ops) <get_thread_area,
9967 install_fast_tracepoint_jump_pad>: New fields.
9968 (struct lwp_info) <collecting_fast_tracepoint,
9969 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9970 (linux_get_thread_area): Declare.
9971 * linux-x86-low.c (jump_insn): New.
9972 (x86_get_thread_area): New.
9973 (append_insns): New.
9975 (amd64_install_fast_tracepoint_jump_pad): New.
9976 (i386_install_fast_tracepoint_jump_pad): New.
9977 (x86_install_fast_tracepoint_jump_pad): New.
9978 (the_low_target): Install x86_get_thread_area and
9979 x86_install_fast_tracepoint_jump_pad.
9980 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9981 (struct fast_tracepoint_jump): New.
9982 (fast_tracepoint_jump_insn): New.
9983 (fast_tracepoint_jump_shadow): New.
9984 (find_fast_tracepoint_jump_at): New.
9985 (fast_tracepoint_jump_here): New.
9986 (delete_fast_tracepoint_jump): New.
9987 (set_fast_tracepoint_jump): New.
9988 (uninsert_fast_tracepoint_jumps_at): New.
9989 (reinsert_fast_tracepoint_jumps_at): New.
9990 (set_breakpoint_at): Use write_inferior_memory.
9991 (uninsert_raw_breakpoint): Use write_inferior_memory.
9992 (check_mem_read): Mask out fast tracepoint jumps.
9993 (check_mem_write): Mask out fast tracepoint jumps.
9994 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9995 (set_fast_tracepoint_jump): Declare.
9996 (delete_fast_tracepoint_jump)
9997 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9998 (reinsert_fast_tracepoint_jumps_at): Declare.
9999 * regcache.c: Don't compile many functions when building the
10000 in-process agent library.
10001 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10002 the register buffer in the heap.
10003 (free_register_cache): If the register buffer isn't owned by the
10004 regcache, don't free it.
10005 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10006 pre-existing register caches.
10007 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10009 (convert_ascii_to_int): : Constify `from' parameter type.
10010 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10011 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10012 the needed buffer in-place.
10013 (relocate_instruction): New.
10014 * server.c (handle_query) <qSymbols>: If the target supports
10015 tracepoints, give it a chance of looking up symbols. Report
10016 support for fast tracepoints.
10017 (handle_status): Stabilize threads.
10018 (process_serial_event): Adjust.
10019 * server.h (struct fast_tracepoint_jump): Forward declare.
10020 (struct process_info) <fast_tracepoint_jumps>: New field.
10021 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10022 (decode_X_packet, decode_M_packet): Adjust.
10023 (relocate_instruction): Declare.
10024 (in_process_agent_loaded): Declare.
10025 (tracepoint_look_up_symbols): Declare.
10026 (struct fast_tpoint_collect_status): Declare.
10027 (fast_tracepoint_collecting): Declare.
10028 (force_unlock_trace_buffer): Declare.
10029 (handle_tracepoint_bkpts): Declare.
10030 (initialize_low_tracepoint)
10031 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10032 * target.h (struct target_ops) <stabilize_threads,
10033 install_fast_tracepoint_jump_pad>: New fields.
10034 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10035 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10036 [HAVE_STDINT_H]: Include stdint.h.
10037 (trace_debug_1): Rename to ...
10038 (trace_vdebug): ... this.
10039 (trace_debug): Rename to ...
10040 (trace_debug_1): ... this. Add `level' parameter.
10041 (trace_debug): New.
10042 (ATTR_USED, ATTR_NOINLINE): New.
10043 (IP_AGENT_EXPORT): New.
10044 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10045 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10046 (about_to_request_buffer_space, trace_buffer_is_full)
10047 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10048 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10049 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10050 (traceframe_write_count, traceframes_created)
10051 (trace_state_variables)
10052 New renaming defines.
10053 (struct ipa_sym_addresses): New.
10054 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10055 (symbol_list): New.
10056 (ipa_sym_addrs): New.
10057 (all_tracepoint_symbols_looked_up): New.
10058 (in_process_agent_loaded): New.
10059 (write_e_ipa_not_loaded): New.
10060 (maybe_write_ipa_not_loaded): New.
10061 (tracepoint_look_up_symbols): New.
10062 (debug_threads) [IN_PROCESS_AGENT]: New.
10063 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10064 (UNKNOWN_SIDE_EFFECTS): New.
10065 (stop_tracing): New.
10066 (flush_trace_buffer): New.
10067 (stop_tracing_bkpt): New.
10068 (flush_trace_buffer_bkpt): New.
10069 (read_inferior_integer): New.
10070 (read_inferior_uinteger): New.
10071 (read_inferior_data_pointer): New.
10072 (write_inferior_data_pointer): New.
10073 (write_inferior_integer): New.
10074 (write_inferior_uinteger): New.
10075 (struct collect_static_trace_data_action): Delete.
10076 (enum tracepoint_type): New.
10077 (struct tracepoint) <type>: New field `type'.
10078 <actions_str, step_actions, step_actions_str>: Only include in
10080 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10081 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10082 (tracepoints): Use IP_AGENT_EXPORT.
10083 (last_tracepoint): Don't include in the IPA.
10084 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10085 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10086 (alloced_trace_state_variables): New.
10087 (trace_state_variables): Use IP_AGENT_EXPORT.
10088 (traceframe_t): Delete unused variable.
10089 (circular_trace_buffer): Don't include in the IPA.
10090 (trace_buffer_start): Delete.
10091 (struct trace_buffer_control): New.
10092 (trace_buffer_free): Delete.
10093 (struct ipa_trace_buffer_control): New.
10094 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10095 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10097 (trace_buffer_ctrl): New.
10098 (TRACE_BUFFER_CTRL_CURR): New.
10099 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10100 Reimplement as macros.
10101 (trace_buffer_wrap): Delete.
10102 (traceframe_write_count, traceframe_read_count)
10103 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10104 (struct tracepoint_hit_ctx) <type>: New field.
10105 (struct fast_tracepoint_ctx): New.
10106 (memory_barrier): New.
10108 (record_tracepoint_error): Update atomically in the IPA.
10109 (clear_inferior_trace_buffer): New.
10110 (about_to_request_buffer_space): New.
10111 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10112 updating the same buffer.
10113 (add_tracepoint): Default the tracepoint's type to trap
10114 tracepoint, and orig_size to -1.
10115 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10116 internal variables.
10117 (create_trace_state_variable): New parameter `gdb'. Handle it.
10118 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10119 (cmd_qtdp): Handle fast tracepoints.
10120 (cmd_qtdv): Adjust.
10121 (max_jump_pad_size): New.
10122 (gdb_jump_pad_head): New.
10123 (get_jump_space_head): New.
10124 (claim_jump_space): New.
10125 (sort_tracepoints): New.
10126 (MAX_JUMP_SIZE): New.
10127 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10129 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10130 support. Upload fast traceframes, and delete internal IPA
10132 (stop_tracing_handler): New.
10133 (flush_trace_buffer_handler): New.
10134 (cmd_qtstop): Upload fast tracepoints.
10135 (response_tracepoint): Handle fast tracepoints.
10136 (tracepoint_finished_step): Upload fast traceframes. Set the
10137 tracepoint hit context's tracepoint type.
10138 (handle_tracepoint_bkpts): New.
10139 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10140 type. Add comment about fast tracepoints.
10141 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10142 non-existing action_str field.
10143 (get_context_regcache): Handle fast tracepoints.
10144 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10146 (fast_tracepoint_from_jump_pad_address): New.
10147 (fast_tracepoint_from_ipa_tpoint_address): New.
10148 (collecting_t): New.
10149 (force_unlock_trace_buffer): New.
10150 (fast_tracepoint_collecting): New.
10152 (gdb_collect): New.
10153 (write_inferior_data_ptr): New.
10154 (target_tp_heap): New.
10155 (target_malloc): New.
10156 (download_agent_expr): New.
10158 (download_tracepoints): New.
10159 (download_trace_state_variables): New.
10160 (upload_fast_traceframes): New.
10161 (IPA_FIRST_TRACEFRAME): New.
10162 (IPA_NEXT_TRACEFRAME_1): New.
10163 (IPA_NEXT_TRACEFRAME): New.
10164 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10165 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10166 (gdb_jump_pad_buffer_end): New.
10167 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10168 (initialize_tracepoint): Adjust.
10169 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10170 buffer. Initialize the low module.
10171 * utils.c (PREFIX, TOOLNAME): New.
10172 (malloc_failure): Use PREFIX.
10173 (error): In the IPA, an error causes an exit.
10174 (fatal, warning): Use PREFIX.
10175 (internal_error): Use TOOLNAME.
10176 (NUMCELLS): Increase to 10.
10177 * configure, config.in: Regenerate.
10179 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10181 * server.c (handle_query) <qSupported>: Do two passes over the
10182 qSupported string to avoid nesting strtok.
10184 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10186 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10188 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10189 -Wl,--dynamic-list.
10190 * configure: Regenerate.
10191 * proc-service.list: New.
10193 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10195 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10198 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10200 * gdbreplay.c (remote_open): Check error return from socket() call by
10201 its equality to -1 not by it being negative.
10202 * remote-utils.c (remote_open): Likewise.
10204 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10206 * config.h: Regenerate.
10208 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10210 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10211 doesn't provide PTRACE_GET_THREAD_AREA.
10213 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10215 * linux-m68k-low.c: Include <asm/ptrace.h>
10216 (ps_get_thread_area): Implement.
10218 2010-05-03 Doug Evans <dje@google.com>
10220 * event-loop.c (struct callback_event): New struct.
10221 (callback_list): New global.
10222 (append_callback_event, delete_callback_event): New functions.
10223 (process_callback): New function.
10224 (start_event_loop): Call it.
10225 * remote-utils.c (NOT_SCHEDULED): Define.
10226 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10227 moved out of readchar.
10228 (readchar): Rewrite. Call reschedule before returning.
10229 (reset_readchar): New function.
10230 (remote_close): Call it.
10231 (process_remaining, reschedule): New functions.
10232 * server.h (callback_handler_func): New typedef.
10233 (append_callback_event, delete_callback_event): Declare.
10235 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10237 * proc-service.c (ps_pglobal_lookup): Use
10238 thread_db_look_up_one_symbol.
10239 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10240 parameter. Use it instead of all_symbols_looked_up.
10241 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10243 (all_symbols_looked_up): Don't declare.
10244 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10245 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10247 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10248 Set all_symbols_looked_up here.
10249 (thread_db_look_up_one_symbol): New.
10250 (thread_db_get_tls_address): Adjust.
10251 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10252 thread_db object on the heap, and tentatively set it in the
10254 (thread_db_init): Don't set all_symbols_looked_up here.
10255 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10257 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10259 * linux-low.c (linux_kill, linux_detach): Adjust.
10260 (status_pending_p_callback): Remove redundant statement. Check
10261 for !TARGET_WAITIKIND_IGNORE, instead of
10262 TARGET_WAITKIND_STOPPED.
10263 (handle_tracepoints): Make sure LWP is locked. Adjust.
10264 (linux_wait_for_event_1): Adjust.
10265 (linux_cancel_breakpoints): New.
10266 (unsuspend_one_lwp): New.
10267 (unsuspend_all_lwps): New.
10268 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10269 (send_sigstop_callback): Change return type to int, add new
10270 `except' parameter and handle it.
10271 (suspend_and_send_sigstop_callback): New.
10272 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10273 pass them down. If SUSPEND, also increment the lwp's suspend
10275 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10276 (need_step_over_p): Don't consider suspended LWPs.
10277 (start_step_over): Adjust.
10278 (proceed_one_lwp): Change return type to int, add new `except'
10279 parameter and handle it.
10280 (unsuspend_and_proceed_one_lwp): New.
10281 (proceed_all_lwps): Use find_inferior instead of
10283 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10284 also decrement the suspend count of LWPs. Pass `except' down,
10285 instead of hacking its suspend count.
10286 (linux_pause_all): Add `freeze' parameter. Adjust.
10287 (linux_unpause_all): New.
10288 (linux_target_ops): Install linux_unpause_all.
10289 * server.c (handle_status): Adjust.
10290 * target.h (struct target_ops): New fields `unpause_all' and
10291 `cancel_breakpoints'. Add new parameter to `pause_all'.
10292 (pause_all): Add new `freeze' parameter.
10293 (unpause_all): New.
10294 (cancel_breakpoints): New.
10295 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10296 cancel breakpoints.
10297 (cmd_qtstart): Pause threads.
10298 (stop_tracing): Pause threads, and cancel breakpoints.
10299 * win32-low.c (win32_target_ops): Adjust.
10301 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10303 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10304 the inferior right away from here...
10305 (linux_wait_1): ... to here, and adjust to check the thread's
10306 last_resume_kind instead of the lwp's step or stop_expected flags.
10308 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10310 * README: Use consistent `GDB' and `GDBserver' spellings.
10312 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10314 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10315 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10316 (linux_detach_one_lwp): Assume the lwp is stopped.
10317 (any_thread_of): Delete.
10318 (linux_detach): Stop all lwps here. Don't blindly delete all
10320 (delete_lwp_callback): New.
10321 (linux_mourn): Delete all lwps of the process that is gone.
10322 (linux_wait_1): Don't delete the last lwp of the process here.
10323 * mem-break.h (mark_breakpoints_out): Declare.
10324 * mem-break.c (mark_breakpoints_out): New.
10325 (free_all_breakpoints): Use it.
10326 * server.c (handle_target_event): If the process is gone, mark
10328 * thread-db.c (struct thread_db) <create_bp>: New field.
10329 (thread_db_enable_reporting): Fix prototype. Store a thread event
10330 breakpoint reference in the thread_db struct.
10331 (thread_db_load_search): Clear the thread_db object.
10332 (try_thread_db_load_1): Ditto.
10333 (switch_to_process): New.
10334 (disable_thread_event_reporting): Use it.
10335 (remove_thread_event_breakpoints): New.
10336 (thread_db_detach, thread_db_mourn): Use it.
10338 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10340 * linux-low.c (linux_enable_event_reporting): New.
10341 (linux_wait_for_event_1, handle_extended_wait): Use it.
10343 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10345 * linux-low.c (linux_kill_one_lwp, linux_kill)
10346 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10347 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10348 SIGSTOP even if the LWP is stopped.
10349 (send_sigstop_callback): New.
10350 (stop_all_lwps): Use send_sigstop_callback instead.
10351 (linux_resume_one_thread): Adjust.
10352 (proceed_one_lwp): Still proceed an LWP that the client has
10353 requested to stop, if we haven't reported it as stopped yet. Make
10354 sure that LWPs the client want stopped, have a pending SIGSTOP.
10356 2010-04-26 Doug Evans <dje@google.com>
10358 * server.c (handle_general_set): Make static.
10360 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10361 Print received char after testing for error/eof instead of before.
10362 (input_interrupt): Tweak comment.
10364 2010-04-23 Doug Evans <dje@google.com>
10366 * server.c (start_inferior): Print inferior argv if --debug.
10368 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10370 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10371 * nto-x86-low.c: Include server.h
10373 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10375 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10376 be consistent with other sources of this directory.
10377 (init_registers_amd64): Correct name of source file of this function
10380 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10382 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10383 64-bit executables.
10385 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10387 * win32-i386-low.c: Add 64-bit support.
10388 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10389 (init_registers_amd64): Declare.
10390 (mappings): Add 64-bit version of array.
10391 (init_windows_x86): New function.
10392 (the_low_target): Change init_arch field to init_windows_x86.
10394 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10396 * win32-low.c: Adapt to support also 64-bit architecture.
10397 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10398 (get_image_name): Use SIZE_T type for local variable `done'.
10399 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10400 (toolhelp_get_dll_name): Idem.
10401 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10402 Use uintptr_t typecast to avoid warning.
10403 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10404 (handle_exception): Use phex_nz to avoid warning.
10405 (win32_wait): Remove unused local variable `process'.
10407 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10409 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10412 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10414 * configure.ac: Use `ws2_32' library for srv_mingw.
10415 * configure: Regenerate.
10416 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10417 * remote-utils.c: Likewise.
10419 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10421 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10422 if __x86_64__ is defined.
10424 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10426 * configure: Regenerate.
10428 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10430 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10431 * target.h (target_ops): New get_tib_address field.
10432 * win32-low.h (win32_thread_info): Add thread_local_base field.
10433 * win32-low.c (child_add_thread): Add tlb argument.
10434 Set thread_local_base field to TLB.
10435 (get_child_debug_event): Adapt to child_add_thread change.
10436 (win32_get_tib_address): New function.
10437 (win32_target_ops): Set get_tib_address field to
10438 win32_get_tib_address.
10439 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10441 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10443 * linux-low.c (linux_mourn): Also remove the process.
10444 * server.c (handle_target_event): Don't remove the process here.
10445 * nto-low.c (nto_mourn): New.
10446 (nto_target_ops): Install it.
10447 * spu-low.c (spu_mourn): New.
10448 (spu_target_ops): Install it.
10449 * win32-low.c (win32_mourn): New.
10450 (win32_target_ops): Install it.
10452 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10454 * server.h (buffer_xml_printf): Remove redundant `;'.
10456 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10458 * regcache.c (set_register_cache): Invalidate regcaches before
10459 changing the register cache layout.
10460 (regcache_invalidate_one): Allow a NULL regcache.
10461 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10462 regcaches before changing the register cache layout or the target
10465 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10467 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10468 variable warning on Linux/x86-64.
10470 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10472 GDBserver disconnected tracing support.
10474 * linux-low.c (linux_remove_process): Delete.
10475 (add_lwp): Don't set last_resume_kind here.
10476 (linux_kill): Use `mourn'.
10477 (linux_detach): Use `thread_db_detach', and `mourn'.
10478 (linux_mourn): New.
10479 (linux_attach_lwp_1): Adjust comment.
10480 (linux_attach): last_resume_kind moved the thread_info; adjust.
10481 (status_pending_p_callback): Adjust.
10482 (linux_wait_for_event_1): Adjust.
10483 (count_events_callback, select_singlestep_lwp_callback)
10484 (select_event_lwp_callback, cancel_breakpoints_callback)
10485 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10486 (proceed_one_lwp): Adjust.
10487 (linux_async): Add debug output.
10488 (linux_thread_stopped): New.
10489 (linux_pause_all): New.
10490 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10492 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10493 (thread_db_free): Delete declaration.
10494 (thread_db_detach, thread_db_mourn): Declare.
10495 * thread-db.c (thread_db_init): Use thread_db_mourn.
10496 (thread_db_free): Delete, split in two.
10497 (disable_thread_event_reporting): New.
10498 (thread_db_detach): New.
10499 (thread_db_mourn): New.
10501 * server.h (struct thread_info) <last_resume_kind>: New field.
10502 <attached>: Add comment.
10503 <gdb_detached>: New field.
10504 (handler_func): Change return type to int.
10505 (handle_serial_event, handle_target_event): Ditto.
10506 (gdb_connected): Declare.
10508 (disconnected_tracing): Declare.
10509 (stop_tracing): Declare.
10511 * server.c (handle_query) <qSupported>: Report support for
10512 disconnected tracing.
10513 (queue_stop_reply_callback): Account for running threads.
10514 (gdb_wants_thread_stopped): New.
10515 (gdb_wants_all_threads_stopped): New.
10516 (gdb_reattached_process): New.
10517 (handle_status): Clear the `gdb_detached' flag of all processes.
10518 In all-stop, stop all threads.
10519 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10520 (process_serial_event): If the remote connection breaks, or if an
10521 exit was forced with "monitor exit", force an event loop exit.
10522 Handle disconnected tracing on detach.
10523 (handle_serial_event): Adjust.
10524 (handle_target_event): If GDB isn't connected, forward events back
10525 to the inferior, unless the last process exited, in which case,
10526 exit gdbserver. Adjust interface.
10528 * remote-utils.c (remote_open): Don't block in accept. Instead
10529 register an event loop source on the listen socket file
10530 descriptor. Refactor bits into ...
10531 (listen_desc): ... this new global.
10532 (gdb_connected): ... this new function.
10533 (enable_async_notification): ... this new function.
10534 (handle_accept_event): ... this new function.
10535 (remote_close): Clear remote_desc.
10537 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10539 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10541 (mourn_inferior): Define.
10542 (target_process_qsupported): Avoid the dangling else problem.
10543 (thread_stopped): Define.
10544 (pause_all): Define.
10545 (target_waitstatus_to_string): Declare.
10546 * target.c (target_waitstatus_to_string): New.
10548 * tracepoint.c (tracing): Make extern.
10549 (disconnected_tracing): New.
10550 (stop_tracing): Make extern. Handle tracing stops due to GDB
10552 (cmd_qtdisconnected): New.
10553 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10554 (handle_tracepoint_general_set): Handle QTDisconnected.
10556 * event-loop.c (event_handler_func): Change return type to int.
10557 (process_event): Bail out if the event handler wants the event
10559 (handle_file_event): Ditto.
10560 (start_event_loop): Bail out if the event handler wants the event
10563 * nto-low.c (nto_target_ops): Adjust.
10564 * spu-low.c (spu_wait): Don't remove the process here.
10565 (spu_target_ops): Adjust.
10566 * win32-low.c (win32_wait): Don't remove the process here.
10567 (win32_target_ops): Adjust.
10569 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10571 * regcache.c (realloc_register_cache): Invalidate inferior's
10572 regcache before recreating it.
10574 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10576 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10578 2010-04-09 Stan Shebs <stan@codesourcery.com>
10579 Pedro Alves <pedro@codesourcery.com>
10581 * server.h (LONGEST): New.
10582 (struct thread_info) <while_stepping>: New field.
10583 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10585 (initialize_tracepoint, handle_tracepoint_general_set)
10586 (handle_tracepoint_query, tracepoint_finished_step)
10587 (tracepoint_was_hit, release_while_stepping_state_list):
10588 (current_traceframe): Declare.
10589 * server.c (handle_general_set): Handle tracepoint packets.
10590 (read_memory): New.
10591 (write_memory): New.
10592 (handle_search_memory_1): Use read_memory.
10593 (handle_query): Report support for conditional tracepoints, trace
10594 state variables, and tracepoint sources. Handle tracepoint
10596 (main): Initialize the tracepoints module.
10597 (process_serial_event): Handle traceframe reads/writes.
10599 * linux-low.c (handle_tracepoints): New.
10600 (linux_wait_1): Call it.
10601 (linux_resume_one_lwp): Handle while-stepping.
10602 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10603 (linux_target_ops): Install them.
10604 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10606 * linux-x86-low.c (x86_supports_tracepoints): New.
10607 (the_low_target). Install it.
10609 * mem-break.h (delete_breakpoint): Declare.
10610 * mem-break.c (delete_breakpoint): Make external.
10612 * target.h (struct target_ops): Add `supports_tracepoints',
10613 `read_pc', and `write_pc' fields.
10614 (target_supports_tracepoints): Define.
10615 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10618 * regcache.h (struct regcache) <registers_owned>: New field.
10619 (init_register_cache, regcache_cpy): Declare.
10620 (regcache_read_pc, regcache_write_pc): Declare.
10621 (register_cache_size): Declare.
10622 (supply_regblock): Declare.
10623 * regcache.c (init_register_cache): New.
10624 (new_register_cache): Use it.
10625 (regcache_cpy): New.
10626 (register_cache_size): New.
10627 (supply_regblock): New.
10628 (regcache_read_pc, regcache_write_pc): New.
10630 * tracepoint.c: New.
10632 * Makefile.in (OBS): Add tracepoint.o.
10633 (tracepoint.o): New rule.
10635 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10637 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10639 (i386-mmx.c): Likewise.
10640 (i386-mmx-linux.o): Likewise.
10641 (i386-mmx-linux.c): Likewise.
10643 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10644 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10645 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10646 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10648 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10649 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10650 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10652 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10654 * Makefile.in (clean): Updated.
10656 (i386-avx.c): Likewise.
10657 (i386-avx-linux.o): Likewise.
10658 (i386-avx-linux.c): Likewise.
10659 (amd64-avx.o): Likewise.
10660 (amd64-avx.c): Likewise.
10661 (amd64-avx-linux.o): Likewise.
10662 (amd64-avx-linux.c): Likewise.
10664 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10665 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10666 (srv_amd64_regobj): Add amd64-avx.o.
10667 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10668 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10669 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10670 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10671 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10672 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10673 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10675 * i387-fp.c: Include "i386-xstate.h".
10677 (i387_cache_to_xsave): Likewise.
10678 (i387_xsave_to_cache): Likewise.
10679 (x86_xcr0): Likewise.
10681 * i387-fp.h (i387_cache_to_xsave): Likewise.
10682 (i387_xsave_to_cache): Likewise.
10683 (x86_xcr0): Likewise.
10685 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10686 * linux-crisv32-low.c (target_regsets): Likewise.
10687 * linux-m68k-low.c (target_regsets): Likewise.
10688 * linux-mips-low.c (target_regsets): Likewise.
10689 * linux-ppc-low.c (target_regsets): Likewise.
10690 * linux-s390-low.c (target_regsets): Likewise.
10691 * linux-sh-low.c (target_regsets): Likewise.
10692 * linux-sparc-low.c (target_regsets): Likewise.
10693 * linux-xtensa-low.c (target_regsets): Likewise.
10695 * linux-low.c: Include <sys/uio.h>.
10696 (regsets_fetch_inferior_registers): Support nt_type.
10697 (regsets_store_inferior_registers): Likewise.
10698 (linux_process_qsupported): New.
10699 (linux_target_ops): Add linux_process_qsupported.
10701 * linux-low.h (regset_info): Add nt_type.
10702 (linux_target_ops): Add process_qsupported.
10704 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10706 (init_registers_i386_avx_linux): New.
10707 (init_registers_amd64_avx_linux): Likewise.
10708 (xmltarget_i386_linux_no_xml): Likewise.
10709 (xmltarget_amd64_linux_no_xml): Likewise.
10710 (PTRACE_GETREGSET): Likewise.
10711 (PTRACE_SETREGSET): Likewise.
10712 (x86_fill_xstateregset): Likewise.
10713 (x86_store_xstateregset): Likewise.
10714 (use_xml): Likewise.
10715 (x86_linux_update_xmltarget): Likewise.
10716 (x86_linux_process_qsupported): Likewise.
10717 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10718 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10719 init_registers_i386_linux here. Call
10720 x86_linux_update_xmltarget.
10721 (the_low_target): Add x86_linux_process_qsupported.
10723 * server.c (handle_query): Call target_process_qsupported.
10725 * target.h (target_ops): Add process_qsupported.
10726 (target_process_qsupported): New.
10728 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10730 * inferiors.c (add_thread): Set last_status kind to
10731 TARGET_WAITKIND_IGNORE.
10732 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10733 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10734 (linux_wait_1): Move `thread' local definition to block that uses
10735 it. Don't NULL initialize `event_child'.
10736 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10737 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10738 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10740 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10742 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10743 an extended waitstatus, or by a watchpoint.
10744 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10745 thread was stepping or has been stopped by a watchpoint.
10747 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10749 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10750 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10751 of another, then delete the previous, and validate all
10753 (validate_inserted_breakpoint): New.
10754 (delete_disabled_breakpoints): New.
10755 (validate_breakpoints): New.
10756 (check_mem_read): Validate breakpoints before trusting their
10757 shadow. Delete disabled breakpoints.
10758 (check_mem_write): Validate breakpoints before trusting they
10759 should be inserted. Delete disabled breakpoints.
10760 * mem-break.h (validate_breakpoints):
10761 * server.c (handle_query): Validate breakpoints when we see a
10764 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10766 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10767 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10768 if we could tell there's a GDB breakpoint at stop_pc.
10769 (need_step_over_p): Don't do a step over if we find a GDB
10770 breakpoint at the resume PC.
10772 * mem-break.c (struct raw_breakpoint): New.
10773 (enum bkpt_type): New type `gdb_breakpoint'.
10774 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10775 fields. New field `raw'.
10776 (find_raw_breakpoint_at): New.
10777 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10778 breakpoint instead.
10779 (set_breakpoint_at): Adjust.
10780 (delete_raw_breakpoint): New.
10781 (release_breakpoint): New.
10782 (delete_breakpoint): Rename to...
10783 (delete_breakpoint_1): ... this. Add proc parameter. Use
10784 release_breakpoint. Return ENOENT.
10785 (delete_breakpoint): Reimplement.
10786 (find_breakpoint_at): Delete.
10787 (find_gdb_breakpoint_at): New.
10788 (delete_breakpoint_at): Delete.
10789 (set_gdb_breakpoint_at): New.
10790 (delete_gdb_breakpoint_at): New.
10791 (gdb_breakpoint_here): New.
10792 (set_reinsert_breakpoint): Use release_breakpoint.
10793 (uninsert_breakpoint): Rename to ...
10794 (uninsert_raw_breakpoint): ... this.
10795 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10796 (reinsert_raw_breakpoint): Change parameter type to
10798 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10800 (check_breakpoints): Adjust. Use release_breakpoint.
10801 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10802 (breakpoint_inserted_here): Ditto.
10803 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10804 Don't trust the breakpoint's shadow if it is not inserted.
10805 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10806 (delete_all_breakpoints): Adjust.
10807 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10808 use delete_breakpoint_1.
10810 * mem-break.h (breakpoints_supported): Delete declaration.
10811 (set_gdb_breakpoint_at): Declare.
10812 (gdb_breakpoint_here): Declare.
10813 (delete_breakpoint_at): Delete.
10814 (delete_gdb_breakpoint_at): Declare.
10816 * server.h (struct raw_breakpoint): Forward declare.
10817 (struct process_info): New field `raw_breakpoints'.
10819 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10822 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10824 * linux-low.c (status_pending_p_callback): Fix comment.
10825 (linux_wait_for_event_1): Move most of the internal breakpoint
10826 handling from here...
10827 (linux_wait_1): ... to here.
10828 (count_events_callback): New.
10829 (select_singlestep_lwp_callback): New.
10830 (select_event_lwp_callback): New.
10831 (cancel_breakpoints_callback): New.
10832 (select_event_lwp): New.
10833 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10834 priority to all LWPs that have had events that should be reported
10835 to the client. Cancel breakpoints when about to reporting the
10836 event to the client, not while stopping lwps. No longer cancel
10837 finished single-steps here.
10838 (cancel_finished_single_step): Delete.
10839 (cancel_finished_single_steps): Delete.
10841 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10843 * mem-break.c (enum bkpt_type): New.
10844 (struct breakpoint): New field `type'.
10845 (set_breakpoint_at): Change return type to struct breakpoint
10846 pointer. Set type to `other_breakpoint' by default.
10847 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10848 in the breakpoint list.
10849 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10850 (reinsert_breakpoint): Rename to ...
10851 (reinsert_raw_breakpoint): ... this.
10852 (reinsert_breakpoints_at): Adjust.
10853 * mem-break.h (struct breakpoint): Declare.
10854 (set_breakpoint_at): Change return type to struct breakpoint
10857 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10859 * server.c (handle_query): Assign, not compare.
10861 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10863 Teach linux gdbserver to step-over-breakpoints.
10865 * linux-low.c (can_hardware_single_step): New.
10866 (supports_breakpoints): New.
10867 (handle_extended_wait): If stopping threads, read the stop pc of
10868 the new cloned LWP.
10870 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10871 low target doesn't support retrieving the PC.
10872 (add_lwp): Set last_resume_kind to resume_continue.
10873 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10874 (linux_attach): Don't clear stop_expected. Set the lwp's
10875 last_resume_kind to resume_stop.
10876 (linux_detach_one_lwp): Don't check for removed breakpoints.
10877 (check_removed_breakpoint): Delete.
10878 (status_pending_p): Rename to ...
10879 (status_pending_p_callback): ... this. Don't check for removed
10880 breakpoints. Don't consider threads that are stopped from GDB's
10882 (linux_wait_for_lwp): Always read the stop_pc here.
10883 (cancel_breakpoint): New.
10884 (step_over_bkpt): New global.
10885 (linux_wait_for_event_1): Implement stepping over breakpoints.
10886 (gdb_wants_lwp_stopped): New.
10887 (gdb_wants_all_stopped): New.
10888 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10889 single-step traps here. Store the thread's last reported target
10891 (send_sigstop): Don't clear stop_expected. Always set it,
10893 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10894 (cancel_finished_single_step): New.
10895 (cancel_finished_single_steps): New.
10896 (wait_for_sigstop): Don't cancel finished single-step traps here.
10897 (linux_resume_one_lwp): Don't check for removed breakpoints.
10898 Don't set `step' on non-hardware step archs.
10899 (linux_set_resume_request): Ignore resume_stop requests if already
10900 stopping or stopped. Set the lwp's last_resume_kind.
10901 (resume_status_pending_p): Don't check for removed breakpoints.
10902 (need_step_over_p): New.
10903 (start_step_over): New.
10904 (finish_step_over): New.
10905 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10906 requests. Clear the thread's last reported target waitstatus.
10907 Don't use the `suspended' flag. Don't consider pending breakpoints.
10908 (linux_resume): Start a step-over if necessary.
10909 (proceed_one_lwp): New.
10910 (proceed_all_lwps): New.
10911 (unstop_all_lwps): New.
10912 * linux-low.h (struct lwp_info): Rewrite comment for the
10913 `suspended' flag. Add the `stop_pc' field. Delete the
10914 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10915 Add `'last_resume_kind' and `need_step_over' fields.
10916 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10917 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10918 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10919 (set_raw_breakpoint_at): New.
10920 (set_breakpoint_at): Rewrite to use it.
10921 (reinsert_breakpoint_handler): Delete.
10922 (set_reinsert_breakpoint): New.
10923 (reinsert_breakpoint_by_bp): Delete.
10924 (delete_reinsert_breakpoints): New.
10925 (uninsert_breakpoint): Rewrite.
10926 (uninsert_breakpoints_at): New.
10927 (reinsert_breakpoint): Rewrite.
10928 (reinsert_breakpoints_at): New.
10929 (check_breakpoints): Rewrite.
10930 (breakpoint_here): New.
10931 (breakpoint_inserted_here): New.
10932 (check_mem_read): Adjust.
10933 * mem-break.h (breakpoints_supported, breakpoint_here)
10934 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10935 (reinsert_breakpoint_by_bp): Delete declaration.
10936 (delete_reinsert_breakpoints): Declare.
10937 (reinsert_breakpoint): Delete declaration.
10938 (reinsert_breakpoints_at): Declare.
10939 (uninsert_breakpoint): Delete declaration.
10940 (uninsert_breakpoints_at): Declare.
10941 (check_breakpoints): Adjust prototype.
10942 * server.h: Adjust include order.
10943 (struct thread_info): Declare here. Add a `last_status' field.
10945 2010-03-23 Michael Snyder <msnyder@vmware.com>
10947 * server.c (crc32): New function.
10948 (handle_query): Add handling for 'qCRC:' request.
10950 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10952 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10953 lwp had been stopped by a watchpoint.
10955 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10957 * server.h (internal_error): Declare.
10958 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10959 * utils.c (internal_error): New function.
10961 2010-03-15 Andreas Schwab <schwab@redhat.com>
10963 * configure.srv: Fix typo setting srv_regobj.
10965 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10967 * linux-low.c (fetch_register): Avoid passing a non string literal
10969 (usr_store_inferior_registers): Ditto.
10971 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10973 * linux-low.c (linux_write_memory): Bail out early if peeking
10976 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10978 * linux-low.h (struct lwp_info): New fields
10979 `stopped_by_watchpoint' and `stopped_data_address'.
10980 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10981 here, and cache them in the lwp object.
10982 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10984 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10986 (linux_stopped_by_watchpoint): Rewrite.
10987 (linux_stopped_data_address): Rewrite.
10989 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10991 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10992 switching the current inferior, not before.
10994 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10996 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10997 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10998 i386-linux.c and amd64-linux.c.
10999 (reg-i386.o): Removed.
11000 (reg-i386.c): Likewise.
11001 (reg-i386-linux.o): Likewise.
11002 (reg-i386-linux.c): Likewise.
11003 (reg-x86-64.o): Likewise.
11004 (reg-x86-64.c): Likewise.
11005 (reg-x86-64-linux.o): Likewise.
11006 (reg-x86-64-linux.c): Likewise.
11008 (i386.c): Likewise.
11009 (i386-linux.o): Likewise.
11010 (i386-linux.c): Likewise.
11011 (amd64.o): Likewise.
11012 (amd64.c): Likewise.
11013 (amd64-linux.o): Likewise.
11014 (amd64-linux.c): Likewise.
11016 * configure.srv (srv_i386_regobj): New.
11017 (srv_i386_linux_regobj): Likewise.
11018 (srv_amd64_regobj): Likewise.
11019 (srv_amd64_linux_regobj): Likewise.
11020 (srv_i386_32bit_xmlfiles): Likewise.
11021 (srv_i386_64bit_xmlfiles): Likewise.
11022 (srv_i386_xmlfiles): Likewise.
11023 (srv_amd64_xmlfiles): Likewise.
11024 (srv_i386_linux_xmlfiles): Likewise.
11025 (srv_amd64_linux_xmlfiles): Likewise.
11026 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11027 srv_xmlfiles to $srv_i386_xmlfiles.
11028 (i[34567]86-*-mingw32ce*): Likewise.
11029 (i[34567]86-*-mingw*): Likewise.
11030 (i[34567]86-*-nto*): Likewise.
11031 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11032 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11033 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11034 (x86_64-*-linux*): Likewise.
11036 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11037 (init_registers_amd64_linux): New.
11038 (x86_arch_setup): Replace init_registers_x86_64_linux with
11039 init_registers_amd64_linux.
11041 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11043 * configure.ac: Check for libdl. If it is not available link against
11044 static libthread_db.
11045 * configure: Regenerate.
11047 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11051 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11052 handing a read watchpoint.
11053 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11055 2010-02-12 Doug Evans <dje@google.com>
11057 * linux-low.c (linux_supports_tracefork_flag): Document.
11058 (linux_look_up_symbols): Add comment.
11060 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11062 * regcache.c (supply_register): Clear regcache if buf is NULL.
11064 2010-02-02 Nicolas Roche <roche@sourceware.org>
11065 Joel Brobecker <brobecker@adacore.com>
11067 * inferiors.c (find_inferior): Add function documentation.
11068 (unloaded_dll): Handle the case where the unloaded dll has not
11069 been previously registered in the dll list.
11071 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11073 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11074 (thumb2_breakpoint): New.
11075 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11077 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11079 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11080 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11083 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11085 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11087 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11089 * linux-s390-low.c (s390_collect_ptrace_register)
11090 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11092 2010-01-21 Doug Evans <dje@google.com>
11094 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11095 (PTRACE_ARG4_TYPE): New macro.
11096 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11097 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11098 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11099 (usr_store_inferior_registers): Ditto.
11100 (linux_read_memory, linux_write_memory): Ditto.
11101 (linux_test_for_tracefork): Ditto.
11103 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11104 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11106 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11108 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11111 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11113 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11114 prototype to take a regcache. Adjust.
11116 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11118 * regcache.h (struct thread_info): Forward declare.
11119 (struct regcache): New.
11120 (new_register_cache): Adjust prototype.
11121 (get_thread_regcache): Declare.
11122 (free_register_cache): Adjust prototype.
11123 (registers_to_string, registers_from_string): Ditto.
11124 (supply_register, supply_register_by_name, collect_register)
11125 (collect_register_as_string, collect_register_by_name): Ditto.
11126 * regcache.c (struct inferior_regcache_data): Delete.
11127 (get_regcache): Rename to ...
11128 (get_thread_regcache): ... this. Adjust. Switch inferior before
11129 fetching registers.
11130 (regcache_invalidate_one): Adjust.
11131 (regcache_invalidate): Fix prototype.
11132 (new_register_cache): Return the new register cache.
11133 (free_register_cache): Change prototype.
11134 (realloc_register_cache): Adjust.
11135 (registers_to_string): Change prototype to take a regcache. Adjust.
11136 (registers_from_string): Ditto.
11137 (register_data): Ditto.
11138 (supply_register): Ditto.
11139 (supply_register_by_name): Ditto.
11140 (collect_register): Ditto.
11141 (collect_register_as_string): Ditto.
11142 (collect_register_by_name): Ditto.
11143 * server.c (process_serial_event): Adjust.
11144 * linux-low.h (regset_fill_func, regset_store_func): Change
11146 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11148 * linux-low.c (get_stop_pc): Adjust.
11149 (check_removed_breakpoint): Adjust.
11150 (linux_wait_for_event): Adjust.
11151 (linux_resume_one_lwp): Adjust.
11152 (fetch_register): Add regcache parameter. Adjust.
11153 (usr_store_inferior_registers): Ditto.
11154 (regsets_fetch_inferior_registers): Ditto.
11155 (regsets_store_inferior_registers): Ditto.
11156 (linux_fetch_registers, linux_store_registers): Ditto.
11157 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11159 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11161 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11162 prototype to take a regcache.
11163 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11164 * remote-utils.c (convert_ascii_to_int, outreg)
11165 (prepare_resume_reply): Change prototype to take a regcache.
11167 * target.h (struct target_ops) <fetch_registers, store_registers>:
11168 Change prototype to take a regcache.
11169 (fetch_inferior_registers, store_inferior_registers): Change
11170 prototype to take a regcache. Adjust.
11171 * proc-service.c (ps_lgetregs): Adjust.
11172 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11173 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11174 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11175 take a regcache. Adjust.
11176 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11177 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11178 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11179 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11180 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11181 (cris_cannot_fetch_register):
11182 (cris_breakpoint_at): Change prototype to take a regcache.
11184 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11185 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11186 to take a regcache. Adjust.
11187 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11189 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11190 take a regcache. Adjust.
11191 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11192 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11193 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11194 * linux-mips-low.c (mips_get_pc):
11195 (mips_set_pc): Change prototype to take a regcache. Adjust.
11196 (mips_reinsert_addr): Adjust.
11197 (mips_collect_register): Change prototype to take a regcache.
11199 (mips_supply_register):
11200 (mips_collect_register_32bit, mips_supply_register_32bit)
11201 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11202 (mips_store_fpregset): Ditto.
11203 * linux-ppc-low.c (ppc_supply_ptrace_register)
11204 (ppc_supply_ptrace_register): Ditto.
11205 (parse_spufs_run): Adjust.
11206 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11207 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11208 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11209 take a regcache. Adjust.
11210 * linux-s390-low.c (s390_collect_ptrace_register)
11211 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11212 (s390_set_pc): Change prototype to take a regcache. Adjust.
11213 (s390_arch_setup): Adjust.
11214 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11215 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11216 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11217 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11218 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11220 (sparc_breakpoint_at): Adjust.
11221 * linux-xtensa-low.c (xtensa_fill_gregset):
11222 (xtensa_store_gregset):
11223 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11224 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11225 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11226 prototype to take a regcache. Adjust.
11227 * win32-arm-low.c (arm_fetch_inferior_register)
11228 (arm_store_inferior_register): Change prototype to take a
11230 * win32-i386-low.c (i386_fetch_inferior_register)
11231 (i386_store_inferior_register): Change prototype to take a
11233 * win32-low.c (child_fetch_inferior_registers)
11234 (child_store_inferior_registers): Change prototype to take a
11236 (win32_wait): Adjust.
11237 (win32_fetch_inferior_registers): Change prototype to take a
11239 (win32_store_inferior_registers): Adjust.
11240 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11241 store_inferior_register>: Change prototype to take a regcache.
11243 2010-01-20 Doug Evans <dje@google.com>
11245 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11247 (linux_wait_for_event1, linux_init_signals): Ditto.
11248 (W_STOPCODE): Provide definition if missing.
11250 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11252 * linux-low.c (linux_core_of_thread): New.
11253 (compare_ints, show_process, list_threads): New.
11254 (linux_qxfer_osdata): Report threads and cores.
11255 (linux_target_op): Register linux_core_of_thread.
11256 * remote-utils.c (prepare_resume_reply): Report the core.
11257 (buffer_xml_printf): Support %d specifier.
11258 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11260 (handle_query): Handle qXfer:threads. Announce availability
11262 * target.h (struct target_ops): New field core_of_thread.
11264 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11266 * Makefile.in (clean): Remove new generated files.
11267 (reg-s390.o, reg-s390.c): Remove rules.
11268 (reg-s390x.o, reg-s390x.c): Likewise.
11269 (s390-linux32.o, s390-linux32.c): Add rules.
11270 (s390-linux64.o, s390-linux64.c): Likewise.
11271 (s390x-linux64.o, s390x-linux64.c): Likewise.
11272 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11273 * linux-s390-low.c: Include <elf.h>.
11274 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11275 (init_registers_s390): Remove prototype.
11276 (init_registers_s390x): Likewise.
11277 (init_registers_s390_linux32): Add prototype.
11278 (init_registers_s390_linux64): Likewise.
11279 (init_registers_s390x_linux64): Likewise.
11280 (s390_num_regs_3264): New define.
11281 (s390_regmap_3264): New global variable.
11282 (s390_cannot_fetch_register): Remove obsolete check.
11283 (s390_cannot_store_register): Likewise.
11284 (s390_collect_ptrace_register): Handle upper/lower register halves.
11285 (s390_supply_ptrace_register): Likewise.
11286 (s390_fill_gregset): Update to register number changes.
11287 (s390_get_hwcap): New routine.
11288 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11289 Install appropriate regmap and register set.
11291 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11293 * server.c (gdbserver_version): Update copyright year to 2010.
11294 * gdbreplay.c (gdbreplay_version): Likewise.
11296 2009-12-28 Doug Evans <dje@google.com>
11298 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11299 elf/external.h. Include <elf.h> instead but only if necessary.
11301 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11303 * linux-low.c (linux_remove_process): Remove `detaching'
11304 parameter. Don't release/detach from thread_db here.
11305 (linux_kill): Release/detach from thread_db here, ...
11306 (linux_detach): ... and here, before actually detaching.
11307 (linux_wait_1): ... and here, when a process exits.
11308 * thread-db.c (any_thread_of): New.
11309 (thread_db_free): Switch the current inferior to a thread of the
11312 2009-12-21 Doug Evans <dje@google.com>
11314 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11316 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11317 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11318 warning ifndef __NR_tkill. Move setting of errno there too.
11319 Delete unnecessary resetting of errno after syscall.
11320 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11322 * configure.ac: Check for dladdr.
11323 * config.in: Regenerate.
11324 * configure: Regenerate.
11325 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11326 (try_thread_db_load): Update.
11328 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11330 2009-12-18 Doug Evans <dje@google.com>
11332 * event-loop.c: Include unistd.h if it exists.
11334 * linux-low.c (my_waitpid): Move definition away from being in
11335 between linux_tracefork_child/linux_test_for_tracefork.
11337 * gdb_proc_service.h (psaddr_t): Fix type.
11338 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11339 signature to match glibc.
11341 2009-12-16 Doug Evans <dje@google.com>
11343 * linux-low.c (linux_read_memory): Fix argument to read.
11345 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11347 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11348 events, don't leave current_inferior pointing at null.
11350 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11352 * win32-low.c (LOG): Delete.
11353 (OUTMSG): Output to stderr.
11354 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11355 on compile time LOG macro.
11356 (win32_wait): Fix debug output.
11358 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11360 * win32-low.c (win32_add_one_solib): If the dll name is
11361 "ntdll.dll", prepend the system directory to the dll path.
11363 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11365 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11367 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11368 Vladimir Prus <vladimir@codesourcery.com>
11370 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11371 * configure.ac: Check for __mcoldfire__ and set
11372 gdb_cv_m68k_is_coldfire.
11373 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11374 reg-cf.o and reg-m68k.o.
11375 * configure: Regenerated.
11377 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11379 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11380 Pass it to thread_db_free.
11381 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11382 proper `detaching' argument to linux_remove_process.
11383 * linux-low.h (thread_db_free): Add `detaching' parameter.
11384 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11386 (thread_db_free): Add `detaching' parameter. Only
11387 call td_ta_clear_event if detaching from process.
11389 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11391 * thread-db.c (thread_db_free): Fix typo.
11393 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11396 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11398 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11400 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11401 with an i686 compiler.
11402 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11404 * configure: Rebuilt.
11406 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11410 * server.c (handle_search_memory_1): Correct read_addr initialization
11411 in loop for searching subsequent chunks.
11413 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11415 * configure.ac: New --with-libthread-db option.
11416 * thread-db.c: Allow direct dependence on libthread_db.
11417 (thread_db_free): Adjust.
11418 * config.in: Regenerate.
11419 * configure: Likewise.
11421 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11424 * thread-db.c (attach_thread): New function.
11425 (maybe_attach_thread): Return success/failure.
11426 (find_new_threads_callback): Adjust.
11427 (thread_db_find_new_threads): Loop until no new threads.
11429 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11431 * proc-service.c (ps_lgetregs): Formatting.
11433 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11435 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11436 * configure.ac: Adjust.
11437 * linux-low.h (struct process_info_private): Move members to struct
11439 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11440 * linux-low.c (linux_remove_process): Adjust.
11441 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11442 * server.c (handle_query): Move code ...
11443 (handle_monitor_command): ... here. New function.
11444 * target.h (struct target_ops): New member.
11445 * thread-db.c (struct thread_db): New.
11446 (libthread_db_search_path): New variable.
11447 (thread_db_create_event, thread_db_enable_reporting)
11448 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11449 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11450 (try_thread_db_load_1, dladdr_to_soname): New functions.
11451 (try_thread_db_load, thread_db_load_search): New functions.
11452 (thread_db_init): Search for libthread_db.
11453 (thread_db_free): New function.
11454 (thread_db_handle_monitor_command): Likewise.
11455 * config.in: Regenerate.
11456 * configure: Regenerate.
11458 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11460 * spu-low.c (spu_kill): Wait for inferior to terminate.
11461 Call clear_inferiors.
11462 (spu_detach): Call clear_inferiors.
11464 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11466 * aclocal.m4: Regenerate.
11467 * config.in: Likewise.
11468 * configure: Likewise.
11470 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11472 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11473 (parse_spufs_run): New function.
11474 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11475 (ppc_breakpoint_at): Handle SPU breakpoints.
11477 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11479 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11480 (SPUFS_MAGIC): Define.
11481 (spu_enumerate_spu_ids): New function.
11482 (linux_qxfer_spu): New function.
11483 (linux_target_ops): Install linux_qxfer_spu.
11485 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11487 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11488 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11489 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11490 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11491 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11492 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11493 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11494 (init_registers_powerpc_cell32l): Add prototype.
11495 (init_registers_powerpc_cell64l): Likewise.
11496 (ppc_arch_setup): Detect Cell/B.E. architecture.
11498 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11500 * Makefile.in (datarootdir): New variable.
11502 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11504 * linux-low.c (linux_write_memory): Update debugging output.
11505 * Makefile.in (clean): Add new descriptions.
11506 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11507 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11508 * configure.srv: Add new files for arm*-*-linux*.
11509 * linux-arm-low.c: Add new declarations.
11510 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11511 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11512 (HWCAP_VFPv3D16): New.
11513 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11514 instead of __IWMMXT__.
11515 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11516 (arm_arch_setup): New.
11517 (target_regsets): Remove #ifdef. Add VFP regset.
11518 (the_low_target): Use arm_arch_setup.
11520 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11522 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11523 the main thread again.
11525 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11527 Adding Neutrino gdbserver.
11528 * configure: Regenerated.
11529 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11530 * configure.srv (i[34567]86-*-nto*): New target.
11531 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11532 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11533 (nto_comctrl) [__QNX__]: New function.
11534 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11536 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11538 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11541 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11542 Pedro Alves <pedro@codesourcery.com>
11544 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11545 don't support CONTEXT_EXTENDED_REGISTERS.
11546 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11547 (the_low_target): Install them.
11548 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11549 failing with ERROR_PIPE_NOT_CONNECTED.
11551 2009-06-30 Doug Evans <dje@google.com>
11552 Pierre Muller <muller@ics.u-strasbg.fr>
11554 Add h/w watchpoint support to x86-linux, win32-i386.
11555 * Makefile.in (SFILES): Add i386-low.c
11556 (i386_low_h): Define.
11557 (i386-low.o): Add dependencies.
11558 (linux-x86-low.o): Add i386-low.h dependency.
11559 (win32-i386-low.o): Ditto.
11560 * i386-low.c: New file.
11561 * i386-low.h: New file.
11562 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11563 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11564 * linux-low.c (linux_add_process): Initialize arch_private.
11565 (linux_remove_process): Free arch_private.
11566 (add_lwp): Initialize arch_private.
11567 (delete_lwp): Free arch_private.
11568 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11570 * linux-low.h (process_info_private): New member arch_private.
11571 (lwp_info): New member arch_private.
11572 (linux_target_ops): New members new_process, new_thread,
11574 (ptid_of): New macro.
11575 * linux-x86-low.c: Include stddef.h, i386-low.h.
11576 (arch_process_info): New struct.
11577 (arch_lwp_info): New struct.
11578 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11579 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11580 (i386_dr_low_get_status): New function.
11581 (x86_insert_point, x86_remove_point): New functions.
11582 (x86_stopped_by_watchpoint): New function.
11583 (x86_stopped_data_address): New function.
11584 (x86_linux_new_process, x86_linux_new_thread): New functions.
11585 (x86_linux_prepare_to_resume): New function.
11586 (the_low_target): Add entries for insert_point, remove_point,
11587 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11589 * server.c (debug_hw_points): New global.
11590 (monitor_show_help): Document set debug-hw-points.
11591 (handle_query): Process "set debug-hw-points".
11592 * server.h (debug_hw_points): Declare.
11593 (paddress): Declare.
11594 * utils.c (NUMCELLS, CELLSIZE): New macros.
11595 (get_sell, xsnprintf, paddress): New functions.
11596 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11597 remove_point, stopped_by_watchpoint, stopped_data_address.
11598 * win32-i386-low.c: Include i386-low.h.
11599 (debug_reg_state): Replaces dr.
11600 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11601 (i386_dr_low_get_status): New function.
11602 (i386_insert_point, i386_remove_point): New functions.
11603 (i386_stopped_by_watchpoint): New function.
11604 (i386_stopped_data_address): New function.
11605 (i386_initial_stuff): Update.
11606 (get_thread_context,set_thread_context,i386_thread_added): Update.
11607 (the_low_target): Add entries for insert_point,
11608 remove_point, stopped_by_watchpoint, stopped_data_address.
11609 * win32-low.c (win32_insert_watchpoint): New function.
11610 (win32_remove_watchpoint): New function.
11611 (win32_stopped_by_watchpoint): New function.
11612 (win32_stopped_data_address): New function.
11613 (win32_target_ops): Add entries for insert_watchpoint,
11614 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11615 * win32-low.h (win32_target_ops): New members insert_point,
11616 remove_point, stopped_by_watchpoint, stopped_data_address.
11618 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11620 * server.c (process_serial_event): Re-return unsupported, not
11621 error, if the type isn't recognized. Re-allow supporting only
11622 insert or remove packets. Also call require_running for
11623 breakpoints. Add missing break statement to default case. Tidy.
11624 * target.h (struct target_ops): Rename insert_watchpoint to
11625 insert_point, and remove_watchpoint to remove_point.
11627 * linux-low.h (struct linux_target_ops): Likewise.
11628 * linux-low.c (linux_insert_watchpoint): Rename to ...
11629 (linux_insert_point): ... this. Adjust.
11630 (linux_remove_watchpoint): Rename to ...
11631 (linux_remove_point): ... this. Adjust.
11632 (linux_target_ops): Adjust.
11633 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11634 (cris_insert_point): ... this.
11635 (cris_remove_watchpoint): Rename to ...
11636 (cris_remove_point): ... this.
11637 (the_low_target): Adjust.
11639 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11641 * server.c (handle_v_kill): Pass signal_pid to
11642 kill_inferior if multi_process is zero.
11644 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11646 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11647 * target.h (target_ops): Comment for *_watchpoint to make it clear
11648 the functions can get types '0' and '1'.
11650 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11652 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11653 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11654 * regcache.c (get_regcache): Likewise.
11655 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11656 * win32-low.c (child_fetch_inferior_registers): Remove check for
11659 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11660 Pedro Alves <pedro@codesourcery.com>
11662 * target.h (struct target_ops) <supports_multi_process>: New
11664 (target_supports_multi_process): New.
11665 * server.c (handle_query): Even if GDB reports support, only
11666 enable multi-process if the target also supports it. Report
11667 multi-process support only if the target backend supports it.
11668 * linux-low.c (linux_supports_multi_process): New function.
11669 (linux_target_ops): Install it as target_supports_multi_process
11672 2009-05-24 Doug Evans <dje@google.com>
11674 Global renaming of find_thread_pid to find_thread_ptid.
11675 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11676 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11677 All callers updated.
11679 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11680 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11683 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11684 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11685 (linux_resume_one_lwp): Ditto.
11687 2009-05-23 Doug Evans <dje@google.com>
11689 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11690 from struct inferior_list_entry * to struct lwp_info *.
11691 All callers updated.
11693 2009-05-13 Doug Evans <dje@google.com>
11695 * linux-x86-low.c: Don't include assert.h.
11696 (x86_siginfo_fixup): Use fatal, not assert.
11697 (x86_arch_setup): Fix comment.
11699 2009-05-12 Doug Evans <dje@google.com>
11701 Biarch support for i386/amd64 gdbserver.
11702 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11703 Add linux-x86-low.c.
11704 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11705 (linux-x86-low.o): Add.
11706 * linux-x86-64-low.c: Delete.
11707 * linux-i386-low.c: Delete.
11708 * linux-x86-low.c: New file.
11709 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11711 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11713 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11714 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11715 (linux_child_pid_to_exec_file): New function.
11716 (elf_64_header_p, elf_64_file_p): New functions.
11717 (siginfo_fixup): New function.
11718 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11719 give target a chance to convert layout.
11720 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11721 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11723 2009-05-07 Doug Evans <dje@google.com>
11725 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11726 (regsets_store_inferior_registers): Ditto.
11728 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11732 * linux-low.c (must_set_ptrace_flags): Delete.
11733 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11735 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11736 `lwp->must_set_ptrace_flags' instead.
11737 (linux_wait_for_event_1): Set ptrace options here.
11738 (linux_wait_1): ... not here.
11740 2009-04-30 Doug Evans <dje@google.com>
11742 * inferiors.c (started_inferior_callback): New function.
11743 (attached_inferior_callback): New function.
11744 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11745 * server.c (print_started_pid, print_attached_pid): New functions.
11746 (detach_or_kill_for_exit): New function.
11747 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11748 * server.h (have_started_inferiors_p): Declare.
11749 (have_attached_inferiors_p): Declare.
11751 * inferiors.c (remove_process): Fix memory leak, free process.
11752 * linux-low.c (linux_remove_process): New function.
11753 (linux_kill): Call it instead of remove_process.
11754 (linux_detach, linux_wait_1): Ditto.
11756 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11758 * configure.srv: Add x86 Windows CE target.
11760 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11762 * inferiors.c (get_thread_process): Make global.
11763 * server.h (get_thread_process): Add prototype.
11764 * thread-db.c (find_one_thread): Use get_thread_process
11765 instead of current_process.
11766 (thread_db_get_tls_address): Do not crash if called when
11767 thread layer is not yet initialized.
11769 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11771 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11772 * spu-low.c (current_tid): Rename to ...
11773 (current_ptid): ... this.
11774 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11775 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11776 ptid_get_lwp (current_ptid) instead of current_tid.
11777 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11778 instead of current_tid. Use find_process_pid to verify pid
11779 argument is valid. Pass proper argument to remove_process.
11780 (spu_thread_alive): Compare current_ptid instead of current_tid.
11781 (spu_resume): Likewise.
11783 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11785 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11788 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11790 Implement the multiprocess extensions, and add linux multiprocess
11793 * server.h (ULONGEST): Declare.
11794 (struct ptid, ptid_t): New.
11795 (minus_one_ptid, null_ptid): Declare.
11796 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11797 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11798 (struct inferior_list_entry): Change `id' type from unsigned from
11800 (struct sym_cache, struct breakpoint, struct
11801 process_info_private): Forward declare.
11802 (struct process_info): Declare.
11803 (current_process): Declare.
11804 (all_processes): Declare.
11805 (initialize_inferiors): Declare.
11806 (add_thread): Adjust to use ptid_t.
11807 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11808 (add_process, remove_process, find_thread_pid): Declare.
11809 (find_inferior_id): Adjust to use ptid_t.
11810 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11811 (multi_process): Declare.
11812 (push_event): Adjust to use ptid_t.
11813 (read_ptid, write_ptid): Declare.
11814 (prepare_resume_reply): Adjust to use ptid_t.
11815 (clear_symbol_cache): Declare.
11816 * inferiors.c (all_processes): New.
11817 (null_ptid, minus_one_ptid): New.
11818 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11819 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11820 (add_thread): Change unsigned long to ptid. Remove gdb_id
11822 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11823 (gdb_id_to_thread): Rename to ...
11824 (find_thread_pid): ... this. Change unsigned long to ptid.
11825 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11826 (loaded_dll, pull_pid_from_list): Adjust.
11827 (add_process, remove_process, find_process_pid)
11828 (get_thread_process, current_process, initialize_inferiors): New.
11829 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11830 (struct target_waitstatus) <related_pid>: Ditto.
11831 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11832 return type to int.
11833 (struct target_ops) <join>: Add `pid' argument.
11834 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11835 (struct target_ops) <wait>: Add `ptid' field. Change return type
11837 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11838 (mywait): Add `ptid' argument. Change return type to ptid_t.
11839 (target_pid_to_str): Declare.
11840 * target.c (set_desired_inferior): Adjust to use ptids.
11841 (mywait): Add new `ptid' argument. Adjust.
11842 (target_pid_to_str): New.
11843 * mem-break.h (free_all_breakpoints): Declare.
11844 * mem-break.c (breakpoints): Delelete.
11845 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11846 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11847 to use per-process breakpoint list.
11848 (free_all_breakpoints): New.
11849 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11850 (symbol_cache, all_symbols_looked_up): Delete.
11852 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11854 (prepare_resume_reply): Change ptid argument's type from unsigned
11855 long to ptid_t. Adjust. Implement W;process and X;process.
11856 (free_sym_cache, clear_symbol_cache): New.
11857 (look_up_one_symbol): Adjust to per-process symbol cache. *
11858 * server.c (cont_thread, general_thread, step_thread): Change type
11860 (attached): Delete.
11861 (multi_process): New.
11862 (last_ptid): Change type to ptid_t.
11863 (struct vstop_notif) <ptid>: Change type to ptid_t.
11864 (queue_stop_reply, push_event): Change `ptid' argument's type to
11866 (discard_queued_stop_replies): Add `pid' argument.
11867 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11868 changes. Don't reference the `attached' global.
11869 (attach_inferior): Adjust to mywait interface changes.
11870 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11871 features. Handle and report "multiprocess+". Handle
11873 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11875 (handle_v_kill): New.
11876 (handle_v_stopped): Adjust to use target_pid_to_str.
11877 (handle_v_requests): Allow multiple attaches and runs when
11878 multiprocess extensions are in effect. Handle "vKill".
11879 (myresume): Adjust to use ptids.
11880 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11881 (handle_status): Adjust to discard_queued_stop_replies interface
11883 (first_thread_of, kill_inferior_callback)
11884 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11885 (main): Call initialize_inferiors. Adjust to use ptids, killing
11886 and detaching from all inferiors. Handle multiprocess packet
11888 * linux-low.h: Include gdb_proc_service.h.
11889 (struct process_info_private): New.
11890 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11891 <lwpid_of>: Use ptid_get_lwp.
11892 (get_lwp_thread): Adjust.
11893 (struct lwp_info): Add `dead' member.
11894 (find_lwp_pid): Declare.
11895 * linux-low.c (thread_db_active): Delete.
11896 (new_inferior): Adjust comment.
11897 (inferior_pid): Delete.
11898 (linux_add_process): New.
11899 (handle_extended_wait): Adjust.
11900 (add_lwp): Change unsigned long to ptid.
11901 (linux_create_inferior): Add process to processes table. Adjust
11902 to use ptids. Don't set new_inferior here.
11903 (linux_attach_lwp): Rename to ...
11904 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11905 it. Adjust to use ptids.
11906 (linux_attach_lwp): New.
11907 (linux_attach): Add process to processes table. Don't set
11909 (struct counter): New.
11910 (second_thread_of_pid_p, last_thread_of_process_p): New.
11911 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11912 multiple processes.
11913 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11914 processes. Remove process from process table.
11915 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11916 to multiple processes.
11917 (any_thread_of): New.
11918 (linux_detach): Add `pid' argument, and handle it. Remove process
11919 from processes table.
11920 (linux_join): Add `pid' argument. Handle it.
11921 (linux_thread_alive): Change unsighed long argument to ptid_t.
11922 Consider dead lwps as not being alive.
11923 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11924 threads we're not interested in.
11925 (same_lwp, find_lwp_pid): New.
11926 (linux_wait_for_lwp): Change `pid' argument's type from int to
11928 (linux_wait_for_event): Rename to ...
11929 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11930 from int to ptid_t. Adjust.
11931 (linux_wait_for_event): New.
11932 (linux_wait_1): Add `ptid' argument. Change return type to
11933 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11934 that exit from the process table.
11935 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11937 (mark_lwp_dead): New.
11938 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11939 stopping all threads, mark its main lwp as dead.
11940 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11942 (fetch_register, usr_store_inferior_registers)
11943 (regsets_fetch_inferior_registers)
11944 (regsets_store_inferior_registers, linux_read_memory)
11945 (linux_write_memory): Inline `inferior_pid'.
11946 (linux_look_up_symbols): Adjust to use per-process
11947 `thread_db_active'.
11948 (linux_request_interrupt): Adjust to use ptids.
11949 (linux_read_auxv): Inline `inferior_pid'.
11950 (initialize_low): Don't reference thread_db_active.
11951 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11952 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11953 (ps_getpid): Return the pid of the current inferior.
11954 * thread-db.c (proc_handle, thread_agent): Delete.
11955 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11957 (find_one_thread): Change argument type to ptid_t. Adjust to
11959 (maybe_attach_thread): Adjust to per-process data and ptids.
11960 (thread_db_find_new_threads): Ditto.
11961 (thread_db_init): Ditto.
11962 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11963 processes table. Adjust to use ptids.
11964 (spu_kill, spu_detach): Adjust interface. Remove process from
11966 (spu_join, spu_thread_alive): Adjust interface.
11967 (spu_wait): Adjust interface. Remove process from processes
11968 table. Adjust to use ptids.
11969 * win32-low.c (current_inferior_tid): Delete.
11970 (current_inferior_ptid): New.
11971 (debug_event_ptid): New.
11972 (thread_rec): Take a ptid. Adjust.
11973 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11974 (child_delete_thread): Ditto.
11975 (do_initial_child_stuff): Add `attached' argument. Add process to
11977 (child_fetch_inferior_registers, child_store_inferior_registers):
11979 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11980 (win32_attach): Pass 1 to do_initial_child_stuff.
11981 (win32_kill): Adjust interface. Remove process from processes
11983 (win32_detach): Ditto.
11984 (win32_join): Adjust interface.
11985 (win32_thread_alive): Take a ptid.
11986 (win32_resume): Adjust to use ptids.
11987 (get_child_debug_event): Ditto.
11988 (win32_wait): Adjust interface. Remove exiting process from
11991 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11993 Non-stop mode support.
11995 * server.h (non_stop): Declare.
11996 (gdb_client_data, handler_func): Declare.
11997 (delete_file_handler, add_file_handler, start_event_loop):
11999 (handle_serial_event, handle_target_event, push_event)
12000 (putpkt_notif): Declare.
12001 * target.h (enum resume_kind): New.
12002 (struct thread_resume): Replace `step' field by `kind' field.
12003 (TARGET_WNOHANG): Define.
12004 (struct target_ops) <wait>: Add `options' argument.
12005 <supports_non_stop, async, start_non_stop>: New fields.
12006 (target_supports_non_stop, target_async): New.
12007 (start_non_stop): Declare.
12008 (mywait): Add `options' argument.
12009 * target.c (mywait): Add `options' argument. Print child exit
12010 notifications here.
12011 (start_non_stop): New.
12012 * server.c (non_stop, own_buf, mem_buf): New globals.
12013 (struct vstop_notif): New.
12014 (notif_queue): New global.
12015 (queue_stop_reply, push_event, discard_queued_stop_replies)
12016 (send_next_stop_reply): New.
12017 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12019 (attach_inferior): In non-stop mode, don't wait for the target
12021 (handle_general_set): Handle QNonStop.
12022 (handle_query): When handling qC, return the current general
12023 thread, instead of the first thread of the list.
12024 (handle_query): If the backend supports non-stop mode, include
12025 QNonStop+ in the qSupported query response.
12026 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12028 (handle_v_attach, handle_v_run): Handle non-stop mode.
12029 (handle_v_stopped): New.
12030 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12031 (myresume): Adjust to use resume_kind. Handle non-stop.
12032 (queue_stop_reply_callback): New.
12033 (handle_status): Handle non-stop mode.
12034 (main): Clear non_stop flag on reconnection. Use the event-loop.
12035 Refactor serial protocol handling from here ...
12036 (process_serial_event): ... to this new function. When GDB
12037 selects any thread, select one here. In non-stop mode, wait until
12038 GDB acks all pending events before exiting.
12039 (handle_serial_event, handle_target_event): New.
12040 * remote-utils.c (remote_open): Install remote_desc in the event
12042 (remote_close): Remove remote_desc from the event loop.
12043 (putpkt_binary): Rename to...
12044 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12045 (putpkt_binary): New as wrapper around putpkt_binary_1.
12046 (putpkt_notif): New.
12047 (prepare_resume_reply): In non-stop mode, don't change the
12049 * event-loop.c: New.
12050 * Makefile.in (OBJ): Add event-loop.o.
12051 (event-loop.o): New rule.
12053 * linux-low.h (pid_of): Moved here.
12055 (get_lwp_thread): Use lwpid_of.
12056 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12057 * linux-low.c (pid_of): Delete.
12058 (inferior_pid): Use lwpid_of.
12059 (linux_event_pipe): New.
12060 (target_is_async_p): New.
12062 (handle_extended_wait): Use lwpid_of.
12063 (add_lwp): Don't set lwpid field.
12064 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12065 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12066 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12067 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12068 first. Adjust to linux_wait_for_event interface changes. Use
12070 (linux_detach): Don't delete the main lwp here.
12071 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12072 (status_pending_p): Don't consider explicitly suspended lwps.
12073 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12074 pointer. Add OPTIONS argument. Change return type to int. Use
12075 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12076 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12077 pointer. Add status pointer argument. Return a pid instead of a
12078 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12079 changes. In non-stop mode, don't switch to a random thread.
12080 (linux_wait): Rename to...
12081 (linux_wait_1): ... this. Add target_options argument, and handle
12082 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12083 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12084 clean exit and signal exit code. Don't stop all threads in
12085 non-stop mode. In all-stop mode, only stop all threads when
12086 reporting a stop to GDB. Handle explicit thread stop requests.
12087 (async_file_flush, async_file_mark): New.
12089 (send_sigstop): Use lwpid_of.
12090 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12091 interface changes. In non-stop mode, don't switch to a random
12093 (linux_resume_one_lwp): Use lwpid_of.
12094 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12095 (linux_resume_one_thread): ... this. Handle resume_stop. In
12096 non-stop mode, don't look for pending flag in all threads.
12097 (resume_status_pending_p): Don't consider explicitly suspended
12099 (my_waitpid): Reimplement. Emulate __WALL.
12100 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12102 (sigchld_handler, linux_supports_non_stop, linux_async)
12103 (linux_start_non_stop): New.
12104 (linux_target_ops): Register linux_supports_non_stop, linux_async
12105 and linux_start_non_stop.
12106 (initialize_low): Install SIGCHLD handler.
12107 * thread-db.c (thread_db_create_event, find_one_thread)
12108 (thread_db_get_tls_address): Use lwpid_of.
12109 * win32-low.c (win32_detach): Adjust to use resume_kind.
12110 (win32_wait): Add `options' argument.
12111 * spu-low.c (spu_resume): Adjust to use resume_kind.
12112 (spu_wait): Add `options' argument.
12114 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12116 Decouple target code from remote protocol.
12118 * target.h (enum target_waitkind): New.
12119 (struct target_waitstatus): New.
12120 (struct target_ops) <wait>: Return an unsigned long. Take a
12121 target_waitstatus pointer instead of a char pointer.
12122 (mywait): Likewise.
12123 * target.c (mywait): Change prototype to return an unsigned long.
12124 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12125 * server.h (thread_from_wait, old_thread_from_wait): Delete
12127 (prepare_resume_reply): Change prototype to take a
12129 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12130 (last_status, last_ptid): New.
12131 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12132 pid instead of a signal.
12133 (attach_inferior): Remove "status" and "signal" parameters.
12135 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12137 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12138 (handle_v_requests, myresume): Remove "status" and "signal"
12139 parameters. Adjust.
12140 (handle_status): New.
12141 (main): Delete local `status'. Adjust.
12142 * remote-utils.c: Include target.h.
12143 (prepare_resume_reply): Change prototype to take a
12144 target_waitstatus. Adjust.
12146 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12148 * spu-low.c (spu_wait): Adjust.
12149 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12151 (win32_wait): Adjust.
12153 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12155 * target.h (struct thread_resume): Delete leave_stopped member.
12156 (struct target_ops): Add a `n' argument to the `resume' callback.
12157 * server.c (start_inferior): Adjust.
12158 (handle_v_cont, myresume): Adjust.
12159 * linux-low.c (check_removed_breakpoint): Adjust to resume
12160 interface change, and to removed leave_stopped field.
12161 (resume_ptr): Delete.
12162 (struct thread_resume_array): New.
12163 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12164 resume interface change.
12165 (linux_continue_one_thread, linux_queue_one_thread)
12166 (resume_status_pending_p): Check if the resume field is NULL
12167 instead of checking the leave_stopped member.
12168 (linux_resume): Adjust to the target resume interface change.
12169 * spu-low.c (spu_resume): Adjust to the target resume interface
12171 * win32-low.c (win32_detach, win32_resume): Ditto.
12173 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12175 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12177 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12179 (linux_continue_one_thread): Only preserve the stepping flag if
12180 there's a pending breakpoint.
12182 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12184 * server.c (main): After the inferior having exited, call
12185 remote_close before exiting gdbserver.
12187 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12189 Fix size of FPSCR in Power 7 processors.
12190 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12191 (PPC_FEATURE_HAS_DFP): New #define.
12192 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12195 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12197 * server.c (handle_query) Whitespace and formatting.
12199 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12201 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12202 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12203 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12204 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12205 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12206 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12207 Makefile.in, configure.ac: Fix whitespace throughout.
12208 * configure: Regenerate.
12210 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12212 * inferiors.c (find_inferior): Make it safe for the callback
12213 function to delete the currently iterated inferior.
12215 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12217 * Makefile.in (linuw_low_h): Move higher.
12218 (thread-db.o): Depend on $(linux_low_h).
12220 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12222 Rename "process" to "lwp" throughout.
12224 * linux-low.c (all_processes): Rename to...
12225 (all_lwps): ... this.
12226 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12227 (add_process): Rename to ...
12228 (add_lwp): ... this. Adjust.
12229 (linux_create_inferior): Adjust.
12230 (linux_attach_lwp): Adjust.
12231 (linux_attach): Adjust.
12232 (linux_kill_one_process): Rename to ...
12233 (linux_kill_one_lwp): ... this. Adjust.
12234 (linux_kill): Adjust.
12235 (linux_detach_one_process): Rename to ...
12236 (linux_detach_one_lwp): ... this. Adjust.
12237 (linux_detach): Adjust.
12238 (check_removed_breakpoint): Adjust.
12239 (status_pending_p): Adjust.
12240 (linux_wait_for_process): Rename to ...
12241 (linux_wait_for_lwp): ... this. Adjust.
12242 (linux_wait_for_event): Adjust.
12243 (send_sigstop): Adjust.
12244 (wait_for_sigstop): Adjust.
12245 (stop_all_processes): Rename to ...
12246 (stop_all_lwps): ... this.
12247 (linux_resume_one_process): Rename to ...
12248 (linux_resume_one_lwp): ... this. Adjust.
12249 (linux_set_resume_request, linux_continue_one_thread)
12250 (linux_queue_one_thread, resume_status_pending_p)
12251 (usr_store_inferior_registers, regsets_store_inferior_registers)
12252 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12254 * linux-low.h (get_process): Rename to ...
12255 (get_lwp): ... this. Adjust.
12256 (get_thread_process): Rename to ...
12257 (get_thread_lwp): ... this. Adjust.
12258 (get_process_thread): Rename to ...
12259 (get_lwp_thread): ... this. Adjust.
12260 (struct process_info): Rename to ...
12261 (struct lwp_info): ... this.
12262 (all_processes): Rename to ...
12263 (all_lwps): ... this.
12264 * proc-service.c (ps_lgetregs): Adjust.
12265 * thread-db.c (thread_db_create_event, find_one_thread)
12266 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12268 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12270 * server.c (handle_query): Handle "qAttached".
12272 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12274 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12275 GPLv3, update license URL.
12277 2009-03-01 Doug Evans <dje@google.com>
12279 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12280 (server_h): Add gdb_signals.h.
12281 (signals.o): Update.
12282 * server.h (target_signal_from_host,target_signal_to_host_p)
12283 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12285 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12287 * remote-utils.c (getpkt): Also generate remote-debug
12288 information if noack_mode is set.
12290 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12292 * server.c (handle_query): Report qXfer:siginfo:read and
12293 qXfer:siginfo:write as supported and handle them.
12294 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12295 * linux-low.c (linux_xfer_siginfo): New.
12296 (linux_target_ops): Set it.
12298 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12300 * server.c (gdbserver_usage): Mention --remote-debug.
12301 (main): Accept '--remote-debug' switch.
12303 2009-01-18 Doug Evans <dje@google.com>
12305 * regcache.c (new_register_cache): No need to check result of xcalloc.
12306 * server.c (handle_search_memory): Back out calls to xmalloc,
12307 result is checked and error is returned to user upon failure.
12308 (handle_query): Ditto. Add more checks for result of malloc.
12309 (handle_v_cont): Check result of malloc, report error back to
12311 (handle_v_run): Ditto. Call freeargv.
12312 * server.h (freeargv): Declare.
12313 * utils.c (freeargv): New fn.
12315 2009-01-15 Doug Evans <dje@google.com>
12317 * gdbreplay.c (perror_with_name): Make arg const char *.
12318 * server.h (target_signal_to_name): Make return type const char *.
12319 * thread-db.c (thread_db_err_str): Make return type const char *.
12320 * utils.c (perror_with_name): Make arg const char *.
12322 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12324 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12325 when handling a EXIT_PROCESS_DEBUG_EVENT.
12327 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12329 * gdbreplay.c (gdbreplay_version): Update copyright year.
12330 * server.c (gdbserver_version): Likewise.
12332 2009-01-05 Doug Evans <dje@google.com>
12334 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12335 (handle_extended_wait): Improve comment.
12337 2008-12-13 Doug Evans <dje@google.com>
12339 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12340 * server.h (ATTR_MALLOC): New macro.
12341 (xmalloc,xcalloc,xstrdup): Declare.
12342 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12343 * inferiors.c: Ditto.
12344 * linux-low.c: Ditto.
12345 * mem-break.c: Ditto.
12346 * regcache.c: Ditto.
12347 * remote-utils.c: Ditto.
12350 * win32-low.c: Ditto.
12352 2008-12-12 Doug Evans <dje@google.com>
12354 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12355 in debugging printf.
12357 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12359 2008-12-09 Doug Evans <dje@google.com>
12361 * linux-low.h (struct process_info): Delete member tid, unused.
12362 * thread-db.c (find_one_thread): Update.
12363 (maybe_attach_thread): Update.
12365 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12367 * target.h (struct target_ops): Add qxfer_osdata member.
12368 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12370 (linux_qxfer_osdata): New functions.
12371 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12373 * server.c (handle_query): Handle "qXfer:osdata:read:".
12374 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12375 (buffer_xml_printf): New functions.
12376 * server.h (struct buffer): New.
12377 (buffer_grow_str, buffer_grow_str0): New macros.
12378 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12379 (buffer_xml_printf): Declare.
12381 2008-11-24 Doug Evans <dje@google.com>
12383 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12385 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12387 * server.c (handle_v_run): Always use the supplied argument list.
12389 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12391 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12392 (xtensa_regmap_table): Add entry for scompare1.
12394 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12396 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12397 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12398 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12399 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12400 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12401 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12402 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12403 XML target descriptions.
12404 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12405 when inferior is running on an ISA 2.05 or later processor. Add
12406 special case to return offset for full 64-bit slot of FPSCR when
12409 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12411 * Makefile.in (SFILES, clean): Added sparc64 files.
12412 (reg-sparc64.o, reg-sparc64.c): New.
12413 * configure.srv (sparc*-*-linux*): New configuration.
12414 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12415 syscall arguments for SPARC.
12416 (regsets_store_inferior_registers): Likewise.
12417 * linux-sparc-low.c: New file.
12419 2008-10-21 Doug Evans <dje@google.com>
12421 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12422 (READLINE_DIR,READLINE_DEP): Delete.
12423 (INTERNAL_CFLAGS): Update.
12424 (LINTFLAGS): Update.
12426 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12428 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12429 whole argv from the last run, not just argv[0].
12431 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12433 * regcache.c (new_register_cache): Return NULL if the register
12434 cache size isn't known yet.
12435 (free_register_cache): Avoid dereferencing a NULL regcache.
12437 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12439 * configure.srv: Merge MIPS and MIPS64.
12441 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12443 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12445 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12447 * Makefile.in: Add required vsx dependencies.
12449 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12450 Declare init_registers_powerpc_vsx32l.
12451 Declare init_registers_powerpc_vsx64l.
12452 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12453 (ppc_arch_setup): Check for VSX in hwcap.
12454 (ppc_fill_vsxregset): New function.
12455 (ppc_store_vsxregset): New function.
12456 Add new VSX entry in regset_info target_regsets.
12458 * configure.srv: Add new VSX dependencies.
12460 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12462 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12463 (remote_open): Set or clear transport_is_reliable.
12464 (putpkt_binary): Don't expect acks in noack mode.
12465 (getpkt): Don't send ack/nac in noack mode.
12466 * server.c (handle_general_set): Handle QStartNoAckMode.
12467 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12469 (main): Reset noack_mode on every connection.
12470 * server.h (noack_mode): Declare.
12472 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12474 * Makefile.in (GDBREPLAY_OBS): New variable.
12475 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12477 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12478 Daniel Jacobowitz <dan@codesourcery.com>
12480 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12481 (usr_store_inferior_registers): Likewise.
12482 (regsets_store_inferior_registers): Likewise.
12484 2008-07-31 Rolf Jansen <rj@surtec.com>
12485 Pedro Alves <pedro@codesourcery.com>
12487 * configure.ac: Check for memmem declaration.
12488 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12489 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12490 (disable_packet_qfThreadInfo): Unconditionally compile.
12491 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12492 * configure, config.in: Regenerate.
12494 2008-07-28 Doug Kwan <dougkwan@google.com>
12496 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12497 (linux_write_memory): Remove declaration of errno.
12499 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12501 * linux-low.c (handle_extended_wait): Do not use "status"
12502 variable uninitialized.
12504 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12506 * server.c (handle_v_attach): Inhibit reporting dll changes.
12508 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12510 * remote-utils.c (prepare_resume_reply): If requested, don't
12511 output "thread:TID" in the T stop reply.
12513 * server.c (disable_packet_vCont, disable_packet_Tthread)
12514 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12515 (handle_query): If requested, disable support for qC, qfThreadInfo
12517 (handle_v_requests): If requested, disable support for vCont.
12518 (gdbserver_show_disableable): New.
12519 (main): Handle --disable-packet and --disable-packet=LIST.
12521 * server.h (disable_packet_vCont, disable_packet_Tthread)
12522 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12524 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12526 * server.c (gdbserver_usage): Mention --version.
12528 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12530 * Makefile.in (gdbreplay.o): New rule.
12532 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12534 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12535 message, not gdbserver.
12537 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12538 Nathan Sidwell <nathan@codesourcery.com>
12539 Joseph Myers <joseph@codesourcery.com>
12541 * acinclude.m4: Include ../../config/acx.m4.
12542 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12543 * configure, config.in: Regenerate.
12544 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12545 * server.c (gdbserver_version): Print PKGVERSION.
12546 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12547 (main): Adjust gdbserver_usage calls.
12548 * gdbreplay.c (version, host_name): Add declarations.
12549 (gdbreplay_version, gdbreplay_usage): New.
12550 (main): Accept --version and --help options.
12552 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12554 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12555 (arm_breakpoint_at): Handle Thumb.
12556 (the_low_target): Add comment.
12558 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12560 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12562 2008-05-09 Doug Evans <dje@google.com>
12564 * server.h (decode_search_memory_packet): Declare.
12565 * remote-utils.c (decode_search_memory_packet): New fn.
12566 * server.c (handle_search_memory_1): New fn.
12567 (handle_search_memory): New fn.
12568 (handle_query): Process qSearch:memory packets.
12570 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12572 * regcache.c (registers_length): Remove.
12573 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12574 full register packet.
12575 * regcache.h (registers_length): Remove prototype.
12576 * server.h (PBUFSIZ): Define to 16384.
12578 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12580 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12581 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12582 powerpc-64l.o, and powerpc-altivec64l.o.
12583 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12584 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12585 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12586 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12587 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12590 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12591 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12592 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12593 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12594 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12595 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12596 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12597 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12598 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12599 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12602 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12603 (init_registers_powerpc_32l): ... this new prototype.
12604 (init_registers_powerpc_32): Remove, replace by ...
12605 (init_registers_powerpc_altivec32l): ... this new prototype.
12606 (init_registers_powerpc_e500): Remove, replace by ...
12607 (init_registers_powerpc_e500l): ... this new prototype.
12608 (init_registers_ppc64): Remove, replace by ...
12609 (init_registers_powerpc_64l): ... this new prototype.
12610 (init_registers_powerpc_64): Remove, replace by ...
12611 (init_registers_powerpc_altivec64l): ... this new prototype.
12612 (ppc_num_regs): Set to 73.
12613 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12614 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12615 (ppc_cannot_store_register): Handle orig_r3 and trap.
12616 (ppc_arch_setup): Update init_registers_... calls.
12617 (ppc_fill_gregset): Handle orig_r3 and trap.
12619 * inferiors.c (clear_inferiors): Reset current_inferior.
12621 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12623 * acinclude.m4: Add override.m4.
12624 * configure: Regenerate.
12626 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12628 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12629 initial call to init_register_ppc64.
12631 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12633 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12634 single powerpc*-*-linux* case.
12635 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12637 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12639 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12640 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12642 * linux-ppc-low.c: Include <elf.h>.
12643 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12644 (ppc_hwcap): New global variable.
12645 (ppc_regmap): Remove __SPE__ #ifdef sections.
12646 (ppc_regmap_e500): New global variable.
12647 (ppc_cannot_store_register): Update __SPE__ special case.
12648 (ppc_get_hwcap): New function.
12649 (ppc_arch_setup): Use it to determine whether inferior supports
12650 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12651 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12652 Do not access registers if target does not support AltiVec.
12653 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12654 Do not access registers if target does not support SPE.
12655 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12657 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12659 * linux-low.c (disabled_regsets, num_regsets): New.
12660 (use_regsets_p): Delete.
12661 (linux_wait_for_process): Clear disabled_regsets.
12662 (regsets_fetch_inferior_registers): Check and set it.
12663 (regsets_store_inferior_registers): Likewise.
12664 (linux_fetch_registers, linux_store_registers): Do not use
12666 (initialize_low): Allocate disabled_regsets.
12668 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12670 * Makefile.in (LIBOBJS): New.
12671 (OBS): Use LIBOBJS.
12672 (memmem.o): New rule.
12673 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12674 * configure: Regenerated.
12676 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12678 * server.c (handle_query): Never return "unsupported" for
12679 qXfer:features:read queries.
12681 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12683 * server.c (get_features_xml): Fix inverted condition.
12684 (handle_query): Always support qXfer:feature:read.
12686 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12688 * server.c (wrapper_argv): New.
12689 (start_inferior): Handle wrapper_argv. If set, expect an extra
12691 (gdbserver_usage): Document --wrapper.
12692 (main): Parse --wrapper.
12694 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12696 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12697 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12698 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12699 (ppc_set_pc): Likewise.
12700 (ppc_arch_setup): New function.
12701 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12702 of collect_register.
12703 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12705 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12707 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12708 instead of linux-ppc64-low.o.
12709 * linux-ppc64-low.c: Remove file.
12710 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12711 (linux-ppc64-low.o): Remove rule.
12713 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12714 (init_registers_powerpc_64): Likewise.
12715 (ppc_regmap): Conditionally define depending on __powerpc64__.
12716 (ppc_cannot_store_register): Do not special-case "fpscr" when
12717 compiled on __powerpc64__.
12718 (ppc_collect_ptrace_register): New function.
12719 (ppc_supply_ptrace_register): New function.
12720 (ppc_breakpoint): Change type to "unsigned int".
12721 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12722 (the_low_target): Conditionally provide initializers for the
12723 arch_setup member depending on __powerpc64__. Install
12724 collect_ptrace_register and supply_ptrace_register members.
12726 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12728 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12729 * server.c (gdbserver_xmltarget): Define.
12730 (get_features_xml): Use it to replace "target.xml" and arch_string.
12732 * configure.srv: Remove srv_xmltarget. Add XML files that were
12733 mentioned there to srv_xmlfiles instead. Remove conditional tests
12734 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12735 srv_xmlfiles and srv_regobj to include all possible choices.
12736 * configure.ac (srv_xmltarget): Remove.
12737 (srv_xmlfiles): Do not add "target.xml".
12738 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12739 checks for supplementary target information.
12740 * configure: Regenerate.
12741 * Makefile.in (XML_TARGET): Remove.
12742 (target.xml): Remove rule.
12743 (clean): Do not clean up target.xml.
12744 (.PRECIOUS): Do not mention target.xml.
12746 * target.h (struct target_ops): Remove arch_string member.
12747 * linux-low.c (linux_arch_string): Remove.
12748 (linux_target_ops): Remove arch_string initializer.
12749 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12750 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12751 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12752 * spu-low.c (spu_arch_string): Remove.
12753 (spu_target_ops): Remove arch_string initializer.
12754 * win32-low.c (win32_arch_string): Remove.
12755 (win32_target_ops): Remove arch_string initializer.
12756 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12757 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12758 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12760 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12762 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12763 by collect_ptrace_register and supply_ptrace_register hooks.
12764 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12765 instead of checking for the_low_target.left_pad_xfer.
12766 (usr_store_inferior_registers): Use collect_ptrace_register callback
12767 instead of checking for the_low_target.left_pad_xfer.
12769 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12770 (s390_supply_ptrace_register): Likewise.
12771 (s390_fill_gregset): Call s390_collect_ptrace_register.
12772 (the_low_target): Update.
12774 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12775 (ppc_supply_ptrace_register): Likewise.
12776 (the_low_target): Update.
12778 * linux-i386-low.c (the_low_target): Update.
12779 * linux-x86-64-low.c (the_low_target): Update.
12781 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12783 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12784 reg-s390.o and reg-s390x.o.
12786 * linux-low.c (new_inferior): New global variable.
12787 (linux_create_inferior, linux_attach): Set it.
12788 (linux_wait_for_process): Call the_low_target.arch_setup after the
12789 target has stopped for the first time.
12790 (initialize_low): Do not call the_low_target.arch_setup.
12792 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12793 (s390_set_pc): Likewise.
12794 (s390_arch_setup): New function.
12795 (the_low_target): Use s390_arch_setup as arch_setup routine.
12797 * regcache.c (realloc_register_cache): New function.
12798 (set_register_cache): Call it for each existing regcache.
12800 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12802 * server.h (init_registers): Remove prototype.
12804 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12805 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12806 instead of init_registers ().
12807 * linux-arm-low.c (init_registers_arm): Add prototype.
12808 (init_registers_arm_with_iwmmxt): Likewise.
12809 (the_low_target): Add initializer for arch_setup field.
12810 * linux-cris-low.c (init_registers_cris): Add prototype.
12811 (the_low_target): Add initializer for arch_setup field.
12812 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12813 (the_low_target): Add initializer for arch_setup field.
12814 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12815 (the_low_target): Add initializer for arch_setup field.
12816 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12817 (the_low_target): Add initializer for arch_setup field.
12818 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12819 (the_low_target): Add initializer for arch_setup field.
12820 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12821 (the_low_target): Add initializer for arch_setup field.
12822 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12823 (init_registers_mips64_linux): Likewise.
12824 (the_low_target): Add initializer for arch_setup field.
12825 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12826 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12827 (the_low_target): Add initializer for arch_setup field.
12828 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12829 (init_registers_powerpc_64): Likewise.
12830 (the_low_target): Add initializer for arch_setup field.
12831 * linux-s390-low.c (init_registers_s390): Add prototype.
12832 (init_registers_s390x): Likewise.
12833 (the_low_target): Add initializer for arch_setup field.
12834 * linux-sh-low.c (init_registers_sh): Add prototype.
12835 (the_low_target): Add initializer for arch_setup field.
12836 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12837 (the_low_target): Add initializer for arch_setup field.
12838 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12839 (the_low_target): Add initializer for arch_setup field.
12841 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12842 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12843 instead of init_registers ().
12844 * win32-arm-low.c (init_registers_arm): Add prototype.
12845 (the_low_target): Add initializer for arch_setup field.
12846 * win32-i386-low.c (init_registers_i386): Add prototype.
12847 (the_low_target): Add initializer for arch_setup field.
12849 * spu-low.c (init_registers_spu): Add prototype.
12850 (initialize_low): Call initialie_registers_spu () instead of
12851 initialize_registers ().
12853 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12855 * server.c (handle_v_requests): When handling the vRun and vAttach
12856 packets, if already debugging a process, don't kill it. Return an
12859 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12861 * server.c (handle_query): Correct length check.
12863 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12865 * win32-low.c (do_initial_child_stuff): Add process handle
12866 parameter. Set current_process_handle and current_process_id from the
12867 parameters. Clear globals.
12868 (win32_create_inferior): Don't set current_process_handle and
12869 current_process_id here. Instead pass them on the call to
12870 do_initial_child_stuff.
12871 (win32_attach): Likewise.
12872 (win32_clear_inferiors): New.
12873 (win32_kill): Don't close the current process handle or the
12874 current thread handle here. Instead call win32_clear_inferiors.
12875 (win32_detach): Don't open a new handle to the process. Call
12876 win32_clear_inferiors.
12877 (win32_join): Don't rely on current_process_handle; open a new
12878 handle using the process id.
12879 (win32_wait): Call win32_clear_inferiors when the inferior process
12882 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12884 * server.c (monitor_show_help): Add "exit".
12886 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12888 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12889 (clean): Add reg-xtensa.c.
12890 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12891 * configure.srv (xtensa*-*-linux*) New target.
12892 * linux-xtensa-low.c: New.
12893 * xtensa-xtregs.c: New.
12895 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12897 * hostio.c: Don't include errno.h.
12898 (errno_to_fileio_errno): Move to hostio-errno.
12899 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12900 error number outputting to the target->hostio_last_error callback.
12901 (hostio_packet_error): Use FILEIO_EINVAL directly.
12902 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12903 calls to hostio_error.
12904 * hostio-errno.c: New.
12905 * server.h (hostio_last_error_from_errno): Declare.
12906 * target.h (target_ops): Add hostio_last_error member.
12907 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12908 as hostio_last_error handler.
12909 * spu-low.c (spu_target_ops): Likewise.
12910 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12911 (wince_hostio_last_error): New functions.
12912 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12913 as hostio_last_error handler.
12914 (win32_target_ops) [!_WIN32_WCE]: Register
12915 hostio_last_error_from_errno as hostio_last_error handler.
12916 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12917 (hostio-errno.o): New rule.
12918 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12919 * configure.srv (srv_hostio_err_objs): New variable. Default to
12921 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12922 * configure: Regenerate.
12924 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12926 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12927 (linux_kill, linux_detach): Clean up the process list.
12928 * remote-utils.c (remote_open): Improve port number parsing.
12929 (putpkt_binary, input_interrupt): Only send interrupts if the target
12931 * server.c (extended_protocol): Make static.
12932 (attached): Define earlier.
12933 (exit_requested, response_needed, program_argv): New variables.
12934 (target_running): New.
12935 (start_inferior): Clear attached here.
12936 (attach_inferior): Set attached here.
12937 (require_running): Define.
12938 (handle_query): Use require_running and target_running. Implement
12940 (handle_v_attach, handle_v_run): New.
12941 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12942 (gdbserver_usage): Update.
12943 (main): Redo argument parsing. Handle --debug and --multi. Handle
12944 --attach along with other options or after the port. Save
12945 program_argv. Support no initial program. Resynchronize
12946 communication with GDB after an error. Handle "monitor exit".
12947 Use require_running and target_running. Always allow the extended
12948 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12949 restart in extended mode.
12950 * README: Refer to the GDB manual. Update --attach usage.
12952 2007-12-20 Andreas Schwab <schwab@suse.de>
12954 * linux-low.c (STACK_SIZE): Define.
12955 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12956 (linux_test_for_tracefork): Likewise.
12958 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12960 * linux-low.c (linux_wait_for_event): Update messages. Do not
12961 reinsert auto-delete breakpoints.
12962 * mem-break.c (struct breakpoint): Change return type of handler to
12964 (set_breakpoint_at): Update handler type.
12965 (reinsert_breakpoint_handler): Return 1 instead of calling
12967 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12969 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12970 * mem-break.h (set_breakpoint_at): Update handler type.
12971 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12972 * win32-low.c (auto_delete_breakpoint): New.
12973 (get_child_debug_event): Use it.
12975 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12977 * configure.ac: Check for pread and pwrite.
12978 * hostio.c (handle_pread): Fall back to lseek and read.
12979 (handle_pwrite): Fall back to lseek and write.
12980 * config.in, configure: Regenerated.
12982 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12984 * server.c (myresume): Add own_buf argument.
12985 (main): Update calls.
12987 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12989 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12990 * remote-utils.c (remote_open): Do not call disable_async_io.
12991 (block_async_io): Delete.
12992 (unblock_async_io): Make static.
12993 (initialize_async_io): New.
12994 * server.c (handle_v_cont): Handle async I/O here.
12995 (myresume): Likewise. Move other common resume tasks here...
12996 (main): ... from here. Call initialize_async_io. Disable async
12997 I/O before the main loop.
12998 * server.h (initialize_async_io): Declare.
12999 (block_async_io, unblock_async_io): Delete prototypes.
13000 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13002 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13004 * remote-utils.c (readchar): Allow binary data in received messages.
13006 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13008 * win32-low.c (attaching): New global.
13009 (win32_create_inferior): Clear the `attaching' global.
13010 (win32_attach): Set the `attaching' global.
13011 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13012 attaching. Only set a breakpoint at the entry point if not
13015 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13017 * server.c (main): Don't report dll events on the initial
13018 connection on attaches.
13020 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13022 * server.c (main): Relax numerical bases supported for the pid of
13023 the --attach command line argument.
13025 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13027 * win32-low.c (win32_attach): Call OpenProcess before
13028 DebugActiveProcess, not after. Add last error output to error
13031 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13033 * win32-low.c (win32_get_thread_context)
13034 (win32_set_thread_context): New functions.
13035 (thread_rec): Use win32_get_thread_context.
13036 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13037 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13040 2007-12-03 Leo Zayas
13041 Pedro Alves <pedro_alves@portugalmail.pt>
13043 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13045 (child_add_thread): Minor cleanup.
13046 (child_continue): Resume artificially suspended threads before
13047 calling ContinueDebugEvent.
13048 (suspend_one_thread): New.
13049 (fake_breakpoint_event): New.
13050 (get_child_debug_event): Change return type to int. Check here if
13051 gdb sent an interrupt request. If a soft interrupt was requested,
13052 fake a breakpoint event. Return 0 if there is no event to handle,
13054 (win32_wait): Don't check here if gdb sent an interrupt request.
13055 Ensure there is a valid event to handle.
13056 (win32_request_interrupt): Add soft interruption method as last
13059 2007-12-03 Leo Zayas
13060 Pedro Alves <pedro_alves@portugalmail.pt>
13062 * win32-low.h (win32_thread_info): Add descriptions to the
13063 structure members. Replace `suspend_count' counter by a
13065 * win32-low.c (thread_rec): Update condition of when to get the
13066 context from the inferior. Rely on ContextFlags being set if it
13067 has already been retrieved. Only suspend the inferior thread if
13068 we haven't already. Warn if that fails.
13069 (continue_one_thread): s/suspend_count/suspended/. Only call
13070 ResumeThread once. Warn if that fails.
13072 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13074 * win32-low.c (win32_wait): Don't read from the inferior when it
13075 has already exited.
13077 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13079 * Makefile.in (win32_low_h): New variable.
13080 (win32-low.o): Add dependency on $(win32_low_h).
13081 (win32-arm-low.o, win32-i386-low.o): New rules.
13083 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13085 * hostio.c: Correct copyright year.
13087 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13089 * Makefile.in (OBS): Add hostio.o.
13090 (hostio.o): New rule.
13091 * server.h (handle_vFile): Declare.
13092 * hostio.c: New file.
13093 * server.c (handle_v_requests): Take packet_len and new_packet_len
13094 for binary packets. Call handle_vFile.
13095 (main): Update call to handle_v_requests.
13097 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13099 * linux-low.c: Include <sched.h>.
13101 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13103 * linux-low.c (linux_tracefork_grandchild): New.
13104 (linux_tracefork_child): Use clone.
13105 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13107 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13109 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13111 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13113 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13115 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13117 * inferiors.c (change_inferior_id): Delete.
13118 (add_pid_to_list, pull_pid_from_list): New.
13119 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13120 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13121 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13122 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13123 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13124 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13125 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13126 (using_threads): Always set to 1.
13127 (handle_extended_wait): New.
13128 (add_process): Do not set TID.
13129 (linux_create_inferior): Set must_set_ptrace_flags.
13130 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13131 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13132 (linux_thread_alive): Rename TID argument to LWPID.
13133 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13134 (linux_wait_for_event): Do not use TID or check using_threads. Update
13135 call to dead_thread_notify. Call handle_extended_wait.
13136 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13137 (send_sigstop): Delete sigstop_sent.
13138 (wait_for_sigstop): Avoid TID.
13139 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13140 (linux_test_for_tracefork): New.
13141 (linux_lookup_signals): Use thread_db_active and
13142 linux_supports_tracefork_flag.
13143 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13144 * linux-low.h (get_process_thread): Avoid TID.
13145 (struct process_ifo): Move thread_known and tid to the end. Remove
13147 (linux_attach_lwp, thread_db_init): Update prototypes.
13148 * server.h (change_inferior_id): Delete prototype.
13149 (add_pid_to_list, pull_pid_from_list): New prototypes.
13150 * thread-db.c (thread_db_use_events): New.
13151 (find_first_thread): Rename to...
13152 (find_one_thread): ...this. Update callers and messages. Do not
13153 call fatal. Check thread_db_use_events. Do not call
13154 change_inferior_id or new_thread_notify.
13155 (maybe_attach_thread): Update. Do not call new_thread_notify.
13156 (thread_db_init): Set thread_db_use_events. Check use_events.
13157 * utils.c (fatal, warning): Correct message prefix.
13159 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13161 * Makefile.in (clean): Remove new files.
13162 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13163 (powerpc-64.o, powerpc-64.c): New rules.
13164 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13165 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13167 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13169 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13170 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13171 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13172 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13173 (target_regsets): Add AltiVec and SPE register sets.
13174 * configure.ac: Check for AltiVec and SPE.
13175 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13176 (ppc_fill_vrregset, ppc_store_vrregset): New.
13177 (target_regsets): Add AltiVec register set.
13178 * configure: Regenerated.
13180 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13182 * linux-low.c (O_LARGEFILE): Define.
13183 (linux_read_memory): Use /proc/PID/mem.
13184 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13185 * configure, config.in: Regenerated.
13187 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13189 * linux-low.c (linux_wait_for_event): Do not pass signals while
13192 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13194 * win32-low.c (create_process): New.
13195 (win32_create_inferior): Use create_process instead of
13196 CreateProcess. If create_process failed retry appending an ".exe"
13197 suffix. Store the GetLastError result immediatelly after
13198 create_process calls and use it on the call to error.
13200 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13202 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13204 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13206 * configure.ac: Switch license to GPLv3.
13208 2007-08-01 Michael Snyder <msnyder@access-company.com>
13210 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13212 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13214 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13216 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13217 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13218 CloseToolhelp32Snapshot.
13219 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13220 CloseToolhelp32Snapshot.
13222 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13224 * server.c (main): Check for inferior exit before main loop.
13226 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13228 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13229 instead of on tmp_desc.
13231 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13232 Daniel Jacobowitz <dan@codesourcery.com>
13234 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13235 (add_thread): Minor cleanups.
13236 (clear_inferiors): Move lower in the file. Clear the DLL
13238 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13239 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13240 (xml_escape_text): New.
13241 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13243 (handle_v_cont): Report errors.
13244 (gdbserver_version): Update.
13245 (main): Correct size of own_buf. Do not report initial DLL events.
13246 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13247 (unloaded_dll, xml_escape_text): New.
13248 * win32-low.c (enum target_waitkind): Update comments.
13249 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13250 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13251 (win32_EnumProcessModules, win32_GetModuleInformation)
13252 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13253 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13254 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13255 (win32_Module32First, win32_Module32Next, load_toolhelp)
13256 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13257 (get_child_debug_event): Handle DLL events.
13258 (win32_wait): Likewise.
13260 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13262 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13263 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13265 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13267 * win32-low.c (handle_output_debug_string): Ignore event if not
13270 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13272 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13274 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13276 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13278 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13280 * inferiors.c (change_inferior_id): Add comment.
13281 * linux-low.c (check_removed_breakpoint): Add an early
13282 prototype. Improve debug output.
13283 (linux_attach): Doc update.
13284 (linux_detach_one_process, linux_detach): Clean up before releasing
13286 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13287 * linux-low.h (struct process_info): Doc improvement.
13288 * mem-break.c (delete_all_breakpoints): New.
13289 * mem-break.h (delete_all_breakpoints): New prototype.
13290 * thread-db.c (find_first_thread): New.
13291 (thread_db_create_event): Call it instead of
13292 thread_db_find_new_threads. Clean up unused variables.
13293 (maybe_attach_thread): Remove first thread handling.
13294 (thread_db_find_new_threads): Use find_first_thread.
13295 (thread_db_get_tls_address): Likewise.
13297 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13299 * thread-db.c (thread_db_find_new_threads): Add prototype.
13300 (thread_db_create_event): Check for the main thread before adding
13302 (maybe_attach_thread): Only enable event reporting if TID == 0.
13303 (thread_db_get_tls_address): Check for new threads.
13305 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13307 * linux-low.c (linux_create_inferior): Try execv before execvp.
13308 * spu-low.c (spu_create_inferior): Likewise.
13310 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13312 * linux-low.c (linux_create_inferior): Change execv to execvp.
13313 * spu-low.c (spu_create_inferior): Likewies.
13315 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13317 * Makefile.in (clean): Clean new files instead of deleted ones.
13318 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13319 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13321 * configure.srv: Specify XML files and new regformats for MIPS and
13323 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13324 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13325 an entry for the restart register.
13326 (mips_cannot_fetch_register, mips_cannot_store_register)
13327 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13328 register names to match the XML descriptions.
13329 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13330 restart register instead of $0.
13332 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13333 Markus Deuling <deuling@de.ibm.com>
13335 * remote-utils.c (decode_xfer_write): New function.
13336 * server.h (decode_xfer_write): Add prototype.
13337 * server.c (handle_query): Add PACKET_LEN argument. Support
13338 qXfer:spu:read and qXfer:spu:write packets.
13339 (main): Pass packet_len to handle_query.
13340 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13341 * target.h (target_ops): Add qxfer_spu.
13343 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13345 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13346 accessing non-seekable spufs files.
13348 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13350 * server.c (handle_query): Add reply for qC packet.
13352 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13353 Leo Zayas <lerele@champenstudios@com>
13355 * server.h (check_remote_input_interrupt_request): New function.
13356 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13357 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13358 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13359 (check_remote_input_interrupt_request): New function.
13360 * server.h (check_remote_input_interrupt_request): Declare.
13361 * win32-low.c (winapi_DebugBreakProcess,
13362 winapi_GenerateConsoleCtrlEvent): New typedefs.
13363 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13365 (win32_wait): Check for remote interrupt request
13366 with check_remote_input_interrupt_request.
13367 (win32_request_interrupt): New function.
13368 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13370 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13372 * win32-low.c (debug_registers_changed,
13373 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13374 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13375 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13376 (thread_rec): Get context using the low target.
13377 (child_add_thread): Call thread_added on the low target,
13378 which does the same thing.
13380 (do_initial_child_stuff): Remove debug registers references.
13381 Set context using the low target. Resume threads after
13382 setting the contexts.
13383 (child_continue): Remove dead variable. Remove debug
13384 registers references.
13385 (child_fetch_inferior_registers): Go through the low target.
13386 (do_child_store_inferior_registers): Remove.
13387 (child_store_inferior_registers): Go through the low target.
13388 (win32_resume): Remove debug registers references.
13389 Set context using the low target.
13390 (handle_exception): Change return type to void. Don't record
13391 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13392 first chance exception.
13393 (get_child_debug_event): Change return type to void. Remove
13394 goto loop. Always return after waiting for debug event.
13395 (win32_wait): Convert to switch statement. Handle spurious
13398 * win32-i386-low.c (debug_registers_changed,
13399 debug_registers_used): New.
13400 (initial_stuff): Rename to ...
13401 (i386_initial_stuff): ... this. Clear debug registers
13403 (store_debug_registers): Delete.
13404 (i386_get_thread_context): New.
13405 (load_debug_registers): Delete.
13406 (i386_set_thread_context): New.
13407 (i386_thread_added): New.
13408 (single_step): Rename to ...
13409 (i386_single_step): ... this.
13410 (do_fetch_inferior_registers): Rename to ...
13411 (i386_fetch_inferior_register): ... this.
13412 (i386_store_inferior_register): New.
13413 (the_low_target): Adapt to new interface.
13415 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13416 (arm_get_thread_context): New.
13417 (arm_set_thread_context): New.
13419 (do_fetch_inferior_registers): Rename to ...
13420 (arm_fetch_inferior_register): ... this.
13421 (arm_store_inferior_register): New.
13422 (arm_wince_breakpoint): Reimplement as unsigned long.
13423 (arm_wince_breakpoint_len): Define.
13424 (the_low_target): Adapt to new interface.
13426 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13427 load_debug_registers. Add get_thread_context, set_thread_context,
13428 thread_added and store_inferior_register. Rename
13429 fetch_inferior_registers to fetch_inferior_register.
13430 (regptr): Remove declaration.
13432 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13434 * linux-low.c (linux_detach): Change return type to int. Return 0.
13435 * spu-low.c (spu_detach): Likewise.
13437 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13439 * target.h (target_ops): Change return type of detach to int.
13441 (join_inferior): New.
13442 * server.c (main): Don't skip detach support on mingw32.
13443 If the inferior doesn't support detaching return error.
13444 Call join_inferior instead of using waitpid.
13445 * linux-low.c (linux_join): New.
13446 (linux_target_op): Add linux_join.
13447 * spu-low.c (spu_join): New.
13448 (spu_target_ops): Add spu_join.
13449 * win32-low.c (win32_detach): Adapt to new interface.
13450 Reopen current_process_handle before detaching. Issue a child
13451 resume before detaching.
13453 (win32_target_op): Add win32_join.
13455 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13457 * win32-low.c (win32-attach): Fix return value.
13458 * target.h (target_ops): Describe ATTACH return values.
13460 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13462 * win32-low.c (GETPROCADDRESS): Define.
13463 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13464 (winapi_DebugSetProcessKillOnExit): Likewise.
13465 (win32_create_inferior): Force usage of ansi CreateProcessA.
13466 (win32_attach): Use GETPROCADDRESS.
13467 (win32_detach): Likewise.
13469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13471 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13473 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13475 * win32-low.c: Commit leftover changes from 2007-03-29.
13477 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13479 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13480 fields short instead of int. Add explicit padding.
13481 (i387_cache_to_fsave): Remove unnecessary casts.
13482 (i387_fsave_to_cache): Doc fix.
13483 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13485 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13487 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13488 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13490 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13492 * configure.srv (arm*-*-mingw32ce*): Move near the other
13495 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13497 * configure.ac: Add errno checking.
13498 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13499 sys/file.h and malloc.h.
13500 (AC_CHECK_DECLS): Add perror.
13501 (srv_mingwce): Handle.
13502 * configure.srv (i[34567]86-*-cygwin*): Add
13503 win32-i386-low.o to srv_tgtobj.
13504 (i[34567]86-*-mingw*): Likewise.
13505 (arm*-*-mingw32ce*): Add case.
13506 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13507 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13508 [__MINGW32CE__] (strerror): New function.
13509 [__MINGW32CE__] (errno): Define to GetLastError.
13510 [__MINGW32CE__] (COUNTOF): New macro.
13511 (remote_open): Remove extra close call.
13512 * mem-break.c (delete_breakpoint_at): New function.
13513 * mem-break.h (delete_breakpoint_at): Declare.
13514 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13515 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13516 [USE_WIN32API] (read, write): Add char* casts.
13517 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13518 * server.h: Include wincecompat.h on Windows CE.
13519 [HAVE_ERRNO_H]: Check.
13520 (perror): Declare if not declared.
13521 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13522 (perror_with_name): Remove errno declaration.
13523 * wincecompat.h: New.
13524 * wincecompat.c: New.
13525 * win32-low.h: New.
13526 * win32-arm-low.c: New.
13527 * win32-i386-low.c: New.
13528 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13529 (OUTMSG2): Make it safe.
13531 (COUNTOF): New macro.
13532 (NUM_REGS): Get it from the low target.
13533 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13534 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13535 (thread_rec): Let low target handle debug registers.
13536 (child_add_thread): Likewise.
13537 (child_init_thread_list): Likewise.
13538 (continue_one_thread): Likewise.
13540 (do_child_fetch_inferior_registers): Move to ...
13541 * win32-i386-low.c: ... here, and rename to ...
13542 (do_fetch_inferior_registers): ... this.
13543 * win32-low.c (child_fetch_inferior_registers):
13544 Go through the low target.
13545 (do_child_store_inferior_registers): Use regptr.
13546 (strwinerror): New function.
13547 (win32_create_inferior): Handle Windows CE.
13548 Use strwinerror instead of strerror on Windows error
13549 codes. Add program to the error output.
13550 Don't close the main thread handle on Windows CE.
13551 (win32_attach): Use coredll.dll on Windows CE.
13552 (win32_kill): Close current process and current
13554 (win32_detach): Use coredll.dll on Windows CE.
13555 (win32_resume): Let low target handle debug registers, and
13557 (handle_exception): Add/Remove initial breakpoint. Avoid
13558 non-existant WSTOPSIG on Windows CE.
13559 (win32_read_inferior_memory): Cast to remove warning.
13560 (win32_arch_string): Go through the low target.
13561 (initialize_low): Call set_breakpoint_data with the low
13562 target's breakpoint.
13563 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13564 FOP_REGNUM, mappings): Move to ...
13565 * win32-i386-low.c: ... here.
13566 * win32-low.c (win32_thread_info): Move to ...
13567 * win32-low.h: ... here.
13568 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13569 win32-arm-low.c and wincecompat.c.
13570 (all:): Add $EXEEXT.
13571 (install-only:): Likewise.
13572 (gdbserver:): Likewise.
13573 (gdbreplay:): Likewise.
13574 * config.in: Regenerate.
13575 * configure: Regenerate.
13577 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13579 * win32-low.c: Rename typedef thread_info to
13580 win32_thread_info throughout.
13582 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13584 * win32-i386-low.c: Rename to ...
13585 * win32-low.c: ... this.
13586 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13587 * Makefile.in: Likewise.
13589 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13591 * remote-utils.c (monitor_output): Constify msg parameter.
13592 * server.h (monitor_output): Likewise.
13593 * win32-i386-low.c (handle_output_debug_string): New.
13594 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13595 handle_output_debug_string.
13596 (get_child_debug_event): Likewise.
13598 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13600 * server.c (main): Correct strtoul check.
13602 2007-03-27 Jon Ringle <jon@ringle.org>
13604 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13606 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13608 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13610 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13612 * terminal.h: Check HAVE_SGTTY_H.
13614 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13616 * remote-utils.c (remote_open): Print out the assigned port number.
13618 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13620 * remote-utils.c (monitor_output): New function.
13621 * server.c (debug_threads): Define here.
13622 (monitor_show_help): New function.
13623 (handle_query): Handle qRcmd.
13624 (main): Do not handle 'd' packet.
13625 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13626 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13629 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13631 * Makefile.in (EXEEXT): New.
13632 (clean): Use $(EXEEXT).
13634 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13636 * target.h (target_ops): Rename send_signal to request_interrupt,
13637 and remove enum target_signal parameter.
13638 * linux-low.c (linux_request_interrupt): Rename from
13639 linux_send_signal, and always send SIGINT.
13640 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13641 and always send SIGINT.
13642 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13644 (input_interrupt): Likewise.
13646 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13648 * server.c (get_features_xml): Check if target implemented
13650 * win32-i386-low.c (win32_arch_string): New.
13651 (win32_target_ops): Add win32_arch_string as arch_string member.
13653 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13655 * spu-low.c (spu_arch_string): New.
13656 (spu_target_ops): Add spu_arch_string.
13658 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13660 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13661 * configure.ac: Do not check for terminal.h.
13662 * configure, config.in: Regenerated.
13664 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13666 * Makefile.in (OBS): Add $(XML_BUILTIN).
13667 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13669 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13670 (arm-with-iwmmxt.c): New.
13671 * config.in, configure: Regenerate.
13672 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13673 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13674 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13675 (arm*-*-linux*): Add iWMMXt and regset support.
13676 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13677 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13678 (arm_store_wmmxregset, target_regsets): New.
13679 * server.c (get_features_xml): Take annex argument. Check builtin
13681 (handle_query): Handle multiple annexes.
13683 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13685 * remote-utils.c [USE_WIN32API] (read, write): Define.
13686 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13689 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13691 * linux-i386-low.c (the_low_target): Set arch_string.
13692 * linux-x86-64-low.c (the_low_target): Likewise.
13693 * linux-low.c (linux_arch_string): New.
13694 (linux_target_ops): Add it.
13695 * linux-low.h (struct linux_target_ops): Add arch_string.
13696 * server.c (write_qxfer_response): Use const void * for DATA.
13697 (get_features_xml): New.
13698 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13699 * target.h (struct target_ops): Add arch_string method.
13701 2007-01-03 Denis Pilat <denis.pilat@st.com>
13702 Daniel Jacobowitz <dan@codesourcery.com>
13704 * linux-low.c (linux_kill): Handle being called with no threads.
13705 * win32-i386-low.c (win32_kill): Likewise.
13706 (get_child_debug_event): Clear current_process_handle.
13708 2006-12-30 Denis PILAT <denis.pilat@st.com>
13709 Daniel Jacobowitz <dan@codesourcery.com>
13711 * remote-utils.c (remote_open): Check the type of specified
13712 serial port devices before opening them.
13713 * server.c (main): Kill the inferior if an error occurs during
13714 the first remote_open.
13716 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13718 * README: Update supported targets.
13720 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13722 * Makefile.in (clean): Remove reg-mips64.c.
13723 (reg-mips64.c, reg-mips64.o): New rules.
13724 * configure.srv: Handle mips64. Include regset support for mips.
13725 * linux-mips-low.c (union mips_register): New.
13726 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13727 (mips_breakpoint, mips_breakpoint_at): Use int.
13728 (mips_collect_register, mips_supply_register)
13729 (mips_collect_register_32bit, mips_supply_register_32bit)
13730 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13731 (mips_store_fpregset, target_regsets): New.
13732 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13734 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13736 * configure.srv: Add target "spu*-*-*".
13737 * Makefile.in (clean): Remove reg-spu.c.
13738 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13739 * spu-low.c: New file.
13741 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13743 * configure.ac: Correct td_thr_tls_get_addr test.
13744 * configure: Regenerated.
13746 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13748 * linux-low.c (linux_wait_for_event): Reformat. Use the
13749 pass_signals array.
13750 * remote-utils.c (decode_address_to_semicolon): New.
13751 * server.c (pass_signals, handle_general_set): New.
13752 (handle_query): Mention QPassSignals for qSupported.
13753 (main): Call handle_general_set.
13754 * server.h (pass_signals, decode_address_to_semicolon): New.
13756 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13758 * server.c (handle_query): Correct error handling for read_auxv.
13760 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13762 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13763 and srv_linux_thread_db to yes.
13764 * linux-s390-low.c (s390_fill_gregset): New function.
13765 (target_regsets): Define data structure.
13767 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13769 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13770 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13771 * config.in, configure: Regenerated.
13772 * inferiors.c (gdb_id_to_thread): New function.
13773 (gdb_id_to_thread_id): Use it.
13774 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13775 * linux-low.h (struct process_info): Add th member.
13776 (thread_db_get_tls_address): New prototype.
13777 * remote-utils.c (decode_address): Make non-static.
13778 * server.c (handle_query): Handle qGetTLSAddr.
13779 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13780 * target.h (struct target_ops): Add get_tls_address.
13781 * thread-db.c (maybe_attach_thread): Save the thread handle.
13782 (thread_db_get_tls_address): New.
13784 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13786 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13787 (linux_resume_one_process): Take a siginfo_t *. Update all
13788 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13789 (struct pending_signals): Add a siginfo_t.
13790 (linux_wait_for_process): Always set last_status.
13791 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13792 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13793 * linux-low.h (struct process_info): Add last_status.
13795 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13797 * remote-utils.c (try_rle): New function.
13798 (putpkt_binary): Use it.
13800 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13802 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13803 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13804 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13805 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13806 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13809 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13811 * server.c (terminal_fd): New variable.
13812 (old_foreground_pgrp): Likewise.
13813 (restore_old_foreground_pgrp): New function.
13814 (start_inferior): Record the terminal file descriptor in terminal_fd
13815 and its original foreground group in old_foreground_pgrp. Register
13816 restore_old_foreground_pgrp with atexit().
13818 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13820 * server.c (handle_query): Correct qPart to qXfer.
13822 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13824 * configure.ac: Check for more headers which are missing on
13825 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13826 * configure.srv: Add Cygwin and mingw32.
13827 * remote-utils.c: Don't include headers unconditionally which
13828 are missing on mingw32. Include <winsock.h> for mingw32.
13829 (remote_open): Adjust for mingw32 support. Flush
13830 standard error after writing to it.
13831 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13832 (unblock_async_io, enable_async_io, disable_async_io)
13833 (readchar, getpkt): Update for Winsock support.
13834 (prepare_resume_reply): Expect a protocol signal number.
13835 * server.c: Disable <sys/wait.h> on mingw32.
13836 (start_inferior): Adjust for mingw32 support. Flush
13837 standard error after writing to it.
13838 (attach_inferior): Likewise. Use protocol signal
13840 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13842 * win32-i386-low.c: New file.
13843 * Makefile.in (XM_CLIBS): Set.
13844 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13845 (win32-i386-low.o): New dependency rule.
13846 * linux-low.c (linux_wait): Use target signal numbers.
13847 * target.h (struct target_ops): Doc fix.
13848 * server.h (target_signal_to_name): New prototype.
13849 * gdbreplay.c: Don't include headers unconditionally which
13850 are missing on mingw32. Include <winsock.h> for mingw32.
13851 (remote_close, remote_open): Adjust for Winsock support.
13852 * configure, config.in: Regenerated.
13854 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13856 * server.c (decode_xfer_read, write_qxfer_response): New.
13857 (handle_query): Take a packet length argument. Handle
13858 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13859 the qSupported response.
13860 (main): Update call to handle_query.
13862 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13864 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13865 (putpkt_binary): Renamed from putpkt and adjusted for binary
13867 (putpkt): New wrapper for putpkt_binary.
13868 (readchar): Don't mask off the high bit.
13869 (decode_X_packet): New function.
13870 * server.c (main): Call putpkt_binary if a handler sets the packet
13871 length. Save the length of the incoming packet. Handle 'X'.
13872 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13874 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13876 * server.c (handle_query): Handle qSupported.
13878 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13880 * remote-utils.c (all_symbols_looked_up): New variable.
13881 (look_up_one_symbol): Check it.
13882 * server.h (look_up_one_symbol): New declaration.
13883 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13885 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13887 * Makefile.in (linux-arm-low.o): Update dependencies.
13888 * linux-arm-low.c: Include "gdb_proc_service.h".
13889 (PTRACE_GET_THREAD_AREA): Define.
13890 (ps_get_thread_area): New function.
13892 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13894 * configure.srv (m68k*-*-uclinux*): New target.
13895 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13896 (linux_resume_one_process): Remove extraneous cast.
13897 (linux_read_offsets): New.
13898 (linux_target_op): Add linux_read_offsets on mmuless systems.
13899 * server.c (handle_query): Add qOffsets logic.
13900 * target.h (struct target_ops): Add read_offsets.
13902 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13904 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13905 (PTRACE_GET_THREAD_AREA): Define.
13906 (ps_get_thread_area): New function.
13907 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13908 (linux-x86-64-low.o): Update.
13910 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13912 * configure.ac: Remove checks for prfpregset_t.
13913 * gdb_proc_service.h: New file.
13914 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13915 new "gdb_proc_service.h".
13916 * proc-service.c: Likewise.
13917 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13918 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13919 * Makefile.in (gdb_proc_service_h): Updated.
13920 * configure, config.in: Regenerated.
13922 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13924 * remote-utils.c (prepare_resume_reply): Move declaration
13925 of gdb_id_from_wait to the top of the block.
13927 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13929 * linux-low.c (regsets_store_inferior_registers): Read the regset
13930 from the target before filling it.
13932 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13934 * server.c (attach_inferior): Return SIGTRAP for a successful
13937 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13939 * Makefile.in (OBS): Add version.o.
13940 (STAGESTUFF): Delete.
13941 (version.o): Add dependencies.
13942 (version.c): Replace rule.
13943 (clean): Remove version.c.
13944 * server.c (gdbserver_version): New.
13945 (gdbserver_usage): Use printf.
13946 (main): Handle --version and --help.
13947 * server.h (version, host_name): Add declarations.
13949 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13961 * linux-x86-64-low.c:
13963 * linux-s390-low.c:
13964 * linux-ppc64-low.c:
13966 * linux-mips-low.c:
13967 * linux-m68k-low.c:
13968 * linux-m32r-low.c:
13971 * linux-ia64-low.c:
13972 * linux-i386-low.c:
13973 * linux-crisv32-low.c:
13985 * gdbserver.1: Add (C) after Copyright. Update the FSF
13988 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13990 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13991 (arm_breakpoint_at): Recognize both breakpoints.
13992 (the_low_target): Use the correct breakpoint instruction.
13994 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13996 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13997 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13998 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13999 (the_low_target): Update.
14001 2005-10-25 Andreas Schwab <schwab@suse.de>
14003 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14005 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14006 (ia64_num_regs): Reduce to 462.
14008 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14010 * acinclude.m4: Correct quoting.
14011 * aclocal.m4: Regenerated.
14013 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14014 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14015 (thread_db_init): Call thread_db_err_str.
14016 * configure.ac: Check for TD_VERSION.
14017 * config.in, configure: Regenerated.
14019 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14021 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14023 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14025 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14026 is not available. Define HAVE_PTRACE_GETREGS if it is.
14027 * config.in, configure: Regenerated.
14028 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14029 * linux-i386-low.c, linux-m68k-low.c: Update to use
14030 HAVE_PTRACE_GETREGS.
14031 * linux-low.c (regsets_fetch_inferior_registers)
14032 (regsets_store_inferior_registers): Only return 0 if we processed
14034 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14035 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14037 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14039 * inferiors.c (struct thread_info): Add gdb_id.
14040 (add_thread): Add gdb_id argument.
14041 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14042 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14043 calls to add_thread.
14044 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14045 * server.c (handle_query): Use thread_to_gdb_id.
14046 (handle_v_cont, main): Use gdb_id_to_thread_id.
14047 * server.h (add_thread): Update prototype.
14048 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14051 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14053 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14054 left-padded registers.
14055 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14056 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14058 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14060 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14061 * configure: Regenerate.
14062 * config.in: Regenerate.
14063 * server.h (NEED_DECLARATION_STRERROR):
14064 Replace with !HAVE_DECL_STRERROR.
14066 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14068 * linux-low.c (linux_wait, linux_send_signal): Don't test
14069 an unsigned long variable for > 0 if it could be MAX_ULONG.
14070 * server.c (myresume): Likewise.
14071 * target.c (set_desired_inferior): Likewise.
14073 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14075 * configure.ac: Simplify and improve check for socklen_t.
14076 * configure, config.in: Regenerate.
14078 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14080 * acconfig.h: Remove.
14081 * configure.ac: Add a test for socklen_t. Use three-argument
14082 AC_DEFINE throughout.
14083 * config.in: Regenerated using autoheader 2.59.
14084 * configure: Regenerated.
14086 * gdbreplay.c (socklen_t): Provide a default.
14087 (remote_open): Use socklen_t.
14088 * remote-utils.c (socklen_t): Provide a default.
14089 (remote_open): Use socklen_t.
14090 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14093 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14095 * linux-low.c (linux_read_memory, linux_write_memory)
14096 (linux_read_auxv): Likewise.
14097 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14098 (check_mem_write): Likewise.
14099 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14101 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14102 (registers_from_string, register_data): Likewise.
14103 * server.c (handle_query, main): Likewise.
14104 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14105 (decode_M_packet): Likewise.
14106 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14107 * target.h (struct target_ops): Update read_memory, write_memory,
14109 (read_inferior_memory, write_inferior_memory): Update.
14110 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14111 to unsigned char *.
14112 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14113 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14114 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14115 linux-s390-low.c, linux-sh-low.c: Update for changes in
14116 read_inferior_memory and the_low_target->breakpoint.
14118 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14120 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14121 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14122 * configure.srv: Add powerpc64-*-linux*.
14123 * linux-ppc64-low.c: New file.
14125 2005-05-23 Orjan Friberg <orjanf@axis.com>
14127 * linux-cris-low.c: New file with support for CRIS.
14128 * linux-crisv32-low.c: Ditto for CRISv32.
14129 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14130 (clean): Add reg-cris.c and reg-crisv32.c.
14131 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14132 reg-crisv32.o, and reg-crisv32.c to make rules.
14133 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14134 recognized targets.
14136 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14138 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14139 of sizeof (PTRACE_XFER_TYPE).
14140 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14142 2005-05-12 Orjan Friberg <orjanf@axis.com>
14144 * target.h (struct target_ops): Add insert_watchpoint,
14145 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14146 pointers for hardware watchpoint support.
14147 * linux-low.h (struct linux_target_ops): Ditto.
14148 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14149 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14150 to linux_target_ops.
14151 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14153 * server.c (main): Recognize 'Z' and 'z' packets.
14155 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14157 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14158 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14159 (the_low_target): Add new members.
14161 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14163 * proc-service.c (ps_lgetregs): Search all_processes instead of
14166 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14168 * server.c (start_inferior): Change return type to int.
14169 (attach_inferior): Change sigptr to int *.
14170 (handle_v_cont, handle_v_requests): Change signal to int *.
14171 (main): Change signal to int.
14173 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14175 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14176 * configure.srv: Add m32r*-*-linux*.
14177 * linux-m32r-low.c: New file.
14179 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14181 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14183 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14185 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14186 Take unsigned long arguments for PIDs.
14187 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14188 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14189 (wait_for_sigstop, linux_resume_one_process)
14190 (regsets_fetch_inferior_registers, linux_send_signal)
14191 (linux_read_auxv): Likewise. Update the types of variables holding
14192 PIDs. Update format string specifiers.
14193 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14194 * remote-utils.c (prepare_resume_reply): Likewise.
14195 * server.c (cont_thread, general_thread, step_thread)
14196 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14198 (handle_query): Update format specifiers.
14199 (handle_v_cont, main): Use strtoul for thread IDs.
14200 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14201 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14202 (general_thread, step_thread, thread_from_wait)
14203 (old_thread_from_wait): Update.
14204 * target.h (struct thread_resume): Use unsigned long for THREAD.
14205 (struct target_ops): Use unsigned long for arguments to attach and
14208 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14210 * acinclude.m4: Include bfd/bfd.m4 directly.
14211 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14212 <agriffis@toolchain.org>.
14213 * aclocal.m4, configure: Regenerated.
14215 2005-01-07 Andrew Cagney <cagney@gnu.org>
14217 * configure.ac: Rename configure.in, require autoconf 2.59.
14218 * configure: Re-generate.
14220 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14222 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14223 LIBS when finished.
14224 * aclocal.m4: Regenerated.
14225 * configure: Regenerated.
14227 2004-11-21 Andreas Schwab <schwab@suse.de>
14229 * linux-m68k-low.c (m68k_num_gregs): Define.
14230 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14231 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14232 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14233 (m68k_breakpoint_at): New. Add to the_low_target.
14235 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14236 srv_linux_thread_db to yes.
14238 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14240 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14241 (ARCH_SET_FS): Likewise.
14242 (ARCH_GET_FS): Likewise.
14243 (ARCH_GET_GS): Likewise.
14245 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14247 * linux-i386-low.c (ps_get_thread_area): New.
14248 * linux-x86-64-low.c (ps_get_thread_area): New.
14249 * linux-low.c: Include <sys/syscall.h>.
14250 (linux_kill_one_process): Don't kill the first thread here.
14251 (linux_kill): Kill the first thread here.
14252 (kill_lwp): New function.
14253 (send_sigstop, linux_send_signal): Use it.
14254 * proc-service.c: Clean up #ifdefs.
14255 (fpregset_info): Delete.
14256 (ps_lgetregs): Update and enable implementation.
14257 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14259 * remote-utils.c (struct sym_cache, symbol_cache): New.
14260 (input_interrupt): Print a clearer message.
14261 (async_io_enabled): New variable.
14262 (enable_async_io, disable_async_io): Use it. Update comments.
14263 (look_up_one_symbol): Use the symbol cache.
14264 * thread-db.c (thread_db_look_up_symbols): New function.
14265 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14267 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14269 * configure.in: Test for -rdynamic.
14270 * configure: Regenerated.
14271 * Makefile (INTERNAL_LDFLAGS): New.
14272 (gdbserver, gdbreplay): Use it.
14274 2004-09-02 Andrew Cagney <cagney@gnu.org>
14276 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14278 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14280 * linux-low.c (linux_wait): Clear all_processes list also.
14282 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14284 * linux-low.c: Include <errno.h>. Remove extern declaration of
14287 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14289 * gdbreplay.c, server.h, utils.c: Update copyright years.
14291 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14293 * server.c (main): Print child status or termination signal from
14294 variable 'signal', not 'sig'.
14296 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14298 * linux-low.c (linux_read_memory): Change return type to
14299 int. Check for and return error from ptrace().
14300 * target.c (read_inferior_memory): Change return type to int. Pass
14301 back return status from the_target->read_memory().
14302 * target.h (struct target_ops): Adapt *read_memory() prototype.
14304 (read_inferior_memory): Adapt prototype.
14305 * server.c (main): Return an error packet if
14306 read_inferior_memory() returns an error.
14308 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14310 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14311 Unify with other clean targets.
14313 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14315 * server.c (handle_v_cont): Call set_desired_inferior.
14317 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14319 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14321 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14323 * linux-low.c (linux_wait): Unblock async I/O.
14324 (linux_resume): Block and enable async I/O.
14325 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14326 * server.h (block_async_io, unblock_async_io): Add prototypes.
14328 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14330 * remote-utils.c (remote_open): Print a status notice after
14331 opening a TCP port.
14332 * server.c (attach_inferior): Print a status notice after
14335 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14337 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14339 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14341 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14343 * server.c, target.h: Update copyright years.
14345 2004-02-25 Roland McGrath <roland@redhat.com>
14347 * target.h (struct target_ops): New member `read_auxv'.
14348 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14349 * linux-low.c (linux_read_auxv): New function.
14350 (linux_target_ops): Initialize `read_auxv' member to that.
14352 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14354 Committed by Jim Blandy <jimb@redhat.com>.
14356 * linux-s390-low.c (s390_num_regs): Update.
14357 (s390_regmap): Remove control registers. Use __s390x__ predefine
14358 instead of GPR_SIZE to distiguish s390 and s390x targets.
14360 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14362 * linux-low.c: Update copyright year.
14363 (check_removed_breakpoint): Clear pending_is_breakpoint.
14364 (linux_set_resume_request, linux_queue_one_thread)
14365 (resume_status_pending_p): New functions.
14366 (linux_continue_one_thread): Use process->resume.
14367 (linux_resume): Only resume threads if there are no pending events.
14368 * linux-low.h (struct process_info): Add resume request
14371 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14373 * regcache.c (new_register_cache): Clear the allocated register
14374 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14376 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14378 * linux-low.c (linux_resume): Take a struct thread_resume *
14380 (linux_wait): Update call.
14381 (resume_ptr): New static variable.
14382 (linux_continue_one_thread): Renamed from
14383 linux_continue_one_process. Use resume_ptr.
14384 (linux_resume): Use linux_continue_one_thread.
14385 * server.c (handle_v_cont, handle_v_requests): New functions.
14386 (myresume): New function.
14387 (main): Handle 'v' case.
14388 * target.h (struct thread_resume): New type.
14389 (struct target_ops): Change argument of "resume" to struct
14391 (myresume): Delete macro.
14393 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14395 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14396 (uninstall): Support DESTDIR.
14398 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14400 * configure.srv: Add xscale*linux copy of arm*linux entry.
14402 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14404 * linux-arm-low.c (arm_reinsert_addr): New function.
14405 (the_low_target): Add arm_reinsert_addr.
14407 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14409 * mem-break.c: Remove whitespace at end of file.
14411 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14413 * configure.in: Check whether we need to prototype strerror.
14414 * server.h: Optionally prototype strerror.
14415 * gdbreplay.c (perror_with_name): Use strerror.
14416 * linux-low.c (linux_attach_lwp): Use strerror.
14417 * utils.c (perror_with_name): Use strerror.
14418 * config.in, configure: Regenerated.
14420 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14422 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14423 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14425 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14427 * Makefile.in (SFILES): Update.
14428 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14429 low-sun3.c: Remove files.
14431 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14433 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14434 (linux_detach_one_process, linux_detach): New functions.
14435 (linux_target_ops): Add linux_detach.
14436 * server.c (main): Handle 'D' packet.
14437 * target.h (struct target_ops): Add "detach" member.
14438 (detach_inferior): Define.
14440 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14442 From Kelley Cook <kelleycook@wideopenwest.com>:
14443 * configure.srv: Accept i[34567]86 variants.
14445 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14447 * linux-low.c (linux_wait_for_event): Correct comment typos.
14448 (linux_resume_one_process): Call check_removed_breakpoint.
14449 (linux_send_signal): New function.
14450 (linux_target_ops): Add linux_send_signal.
14451 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14453 * target.h (struct target_ops): Add send_signal.
14455 2003-05-29 Jim Blandy <jimb@redhat.com>
14457 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14458 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14459 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14460 away part of the register's value.
14462 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14464 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14465 (linux_wait_for_event, linux_init_signals): Likewise.
14467 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14469 * configure.in: Check for stdlib.h.
14470 * configure: Regenerated.
14471 * config.in: Regenerated.
14473 2003-01-04 Andreas Schwab <schwab@suse.de>
14475 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14477 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14479 * Makefile.in: Remove obsolete code.
14481 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14483 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14484 defined(PT_FPR0_HI).
14486 2002-11-17 Stuart Hughes <seh@zee2.com>
14488 * linux-arm-low.c (arm_num_regs): Increase.
14489 (arm_regmap): Include status register.
14491 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14493 * linux-low.c (register_addr): Remove incorrect -1 check.
14495 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14497 * linux-low.c (linux_create_inferior): Call setpgid. Return
14499 (unstopped_p, linux_signal_pid): Remove.
14500 (linux_target_ops): Remove linux_signal_pid.
14501 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14502 global instead of target method.
14503 * target.h (struct target_ops): Remove signal_pid. Update comment
14504 for create_inferior.
14505 * server.c (signal_pid): New variable.
14506 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14507 gdbserver. Set the child to be the foreground process group.
14508 (attach_inferior): Set signal_pid.
14510 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14512 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14514 2002-08-20 Jim Blandy <jimb@redhat.com>
14516 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14519 2002-08-01 Andrew Cagney <cagney@redhat.com>
14521 * Makefile.in: Make chill references obsolete.
14523 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14525 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14526 * configure: Regenerate.
14527 * config.in: Regenerate.
14529 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14531 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14532 (perror_with_name, remote_close, remote_open, expect, play): Static.
14534 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14536 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14537 byte offsets instead of an array of indexes.
14538 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14540 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14542 * regcache.c: Add comment.
14544 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14546 * thread-db.c: New file.
14547 * proc-service.c: New file.
14548 * acinclude.m4: New file.
14549 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14550 proc-service.o, and thread-db.o.
14551 (linux-low.o): Add USE_THREAD_DB.
14552 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14553 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14554 * aclocal.m4: Regenerated.
14555 * config.in: Regenerated.
14556 * configure: Regenerated.
14557 * configure.in: Check for proc_service.h, sys/procfs.h,
14558 thread_db.h, and linux/elf.h headrs.
14559 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14560 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14561 Check for -lthread_db and thread support.
14562 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14563 PowerPC, and SuperH.
14564 * i387-fp.c: Constify arguments.
14565 * i387-fp.h: Likewise.
14566 * inferiors.c: (struct thread_info): Renamed from
14567 `struct inferior_info'. Remove PID member. Use generic inferior
14568 list header. All uses updated.
14569 (inferiors, signal_pid): Removed.
14570 (all_threads): New variable.
14571 (get_thread): Define.
14572 (add_inferior_to_list): New function.
14573 (for_each_inferior): New function.
14574 (change_inferior_id): New function.
14575 (add_inferior): Removed.
14576 (remove_inferior): New function.
14577 (add_thread): New function.
14578 (free_one_thread): New function.
14579 (remove_thread): New function.
14580 (clear_inferiors): Use for_each_inferior and free_one_thread.
14581 (find_inferior): New function.
14582 (find_inferior_id): New function.
14583 (inferior_target_data): Update argument type.
14584 (set_inferior_target_data): Likewise.
14585 (inferior_regcache_data): Likewise.
14586 (set_inferior_regcache_data): Likewise.
14587 * linux-low.c (linux_bp_reinsert): Remove.
14588 (all_processes, stopping_threads, using_thrads)
14589 (struct pending_signals, debug_threads, pid_of): New.
14590 (inferior_pid): Replace with macro.
14591 (struct inferior_linux_data): Remove.
14592 (get_stop_pc, add_process): New functions.
14593 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14594 Use add_process and add_thread.
14595 (linux_attach_lwp): New function, based on old linux_attach. Use
14596 add_process and add_thread. Set stop_expected for new threads.
14597 (linux_attach): New function.
14598 (linux_kill_one_process): New function.
14599 (linux_kill): Kill all LWPs.
14600 (linux_thread_alive): Use find_inferior_id.
14601 (check_removed_breakpoints, status_pending_p): New functions.
14602 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14603 Update. Use WNOHANG. Wait for cloned processes also. Update process
14604 struct for the found process.
14605 (linux_wait_for_event): New function.
14606 (linux_wait): Use it. Support LWPs.
14607 (send_sigstop, wait_for_sigstop, stop_all_processes)
14608 (linux_resume_one_process, linux_continue_one_process): New functions.
14609 (linux_resume): Support LWPs.
14610 (REGISTER_RAW_SIZE): Remove.
14611 (fetch_register): Use register_size instead. Call supply_register.
14612 (usr_store_inferior_registers): Likewise. Call collect_register.
14613 Fix recursive case.
14614 (regsets_fetch_inferior_registers): Improve error message.
14615 (regsets_store_inferior_registers): Add debugging.
14616 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14617 (unstopped_p, linux_signal_pid): New functions.
14618 (linux_target_ops): Add linux_signal_pid.
14619 (linux_init_signals): New function.
14620 (initialize_low): Call it. Initialize using_threads.
14621 * regcache.c (inferior_regcache_data): Add valid
14623 (get_regcache): Fetch registers lazily. Add fetch argument
14624 and update all callers.
14625 (regcache_invalidate_one, regcache_invalidate): New
14627 (new_register_cache): Renamed from create_register_cache.
14628 Return the new regcache.
14629 (free_register_cache): Change argument to a void *.
14630 (registers_to_string, registers_from_string): Call get_regcache
14631 with fetch flag set.
14632 (register_data): Make static. Pass fetch flag to get_regcache.
14633 (supply_register): Call get_regcache with fetch flag clear.
14634 (collect_register): Call get_regcache with fetch flag set.
14635 (collect_register_as_string): New function.
14636 * regcache.h: Update.
14637 * remote-utils.c (putpkt): Flush after debug output and use
14639 Handle input interrupts while waiting for an ACK.
14640 (input_interrupt): Use signal_pid method.
14641 (getpkt): Flush after debug output and use stderr.
14642 (outreg): Use collect_register_as_string.
14643 (new_thread_notify, dead_thread_notify): New functions.
14644 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14645 and general_thread.
14646 (look_up_one_symbol): Flush after debug output.
14647 * server.c (step_thread, server_waiting): New variables.
14648 (start_inferior): Don't use signal_pid. Update call to mywait.
14649 (attach_inferior): Update call to mywait.
14650 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14651 (main): Don't fetch/store registers explicitly. Use
14652 set_desired_inferior. Support proposed ``Hs'' packet. Update
14654 * server.h: Update.
14655 (struct inferior_list, struct_inferior_list_entry): New.
14656 * target.c (set_desired_inferior): New.
14657 (write_inferior_memory): Constify.
14658 (mywait): New function.
14659 * target.h: Update.
14660 (struct target_ops): New signal_pid method.
14661 (mywait): Removed macro, added prototype.
14663 * linux-low.h (regset_func): Removed.
14664 (regset_fill_func, regset_store_func): New.
14665 (enum regset_type): New.
14666 (struct regset_info): Add type field. Use new operation types.
14667 (struct linux_target_ops): stop_pc renamed to get_pc.
14668 Add decr_pc_after_break and breakpoint_at.
14669 (get_process, get_thread_proess, get_process_thread)
14670 (strut process_info, all_processes, linux_attach_lwp)
14671 (thread_db_init): New.
14673 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14674 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14675 (the_low_target): Add new members.
14676 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14677 (i386_store_fpxregset): Constify.
14678 (target_regsets): Add new kind identifier.
14679 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14680 (i386_set_pc): Add debugging.
14681 (i386_breakpoint_at): New function.
14682 (the_low_target): Add new members.
14683 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14684 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14685 (mips_breakpoint_at): New.
14686 (the_low_target): Add new members.
14687 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14688 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14689 (the_low_target): Add new members.
14690 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14691 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14692 (the_low_target): Add new members.
14693 * linux-x86-64-low.c (target_regsets): Add new kind
14696 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14698 From Martin Pool <mbp@samba.org>:
14699 * server.c (gdbserver_usage): New function.
14702 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14704 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14705 stop_at -> stop_pc.
14707 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14709 * Makefile.in: Remove obsolete code.
14711 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14713 * linux-low.c (regsets_fetch_inferior_registers),
14714 (regsets_store_inferior_registers): Removed cast to int from
14716 * regcache.h: Added declaration of struct inferior_info.
14718 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14720 * inferiors.c (struct inferior_info): Add regcache_data.
14721 (add_inferior): Call create_register_cache.
14722 (clear_inferiors): Call free_register_cache.
14723 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14724 * regcache.c (struct inferior_regcache_data): New.
14725 (registers): Remove.
14726 (get_regcache): New function.
14727 (create_register_cache, free_register_cache): New functions.
14728 (set_register_cache): Don't initialize the register cache here.
14729 (registers_to_string, registers_from_string, register_data): Call
14731 * regcache.h: Add prototypes.
14732 * server.h: Likewise.
14734 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14736 * mem-break.c: New file.
14737 * mem-break.h: New file.
14738 * Makefile.in: Add mem-break.o rule; update server.h
14740 * inferiors.c (struct inferior_info): Add target_data
14742 (clear_inferiors): Free target_data member if set.
14743 (inferior_target_data, set_inferior_target_data): New functions.
14744 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14745 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14746 * linux-low.c (linux_bp_reinsert): New variable.
14747 (struct inferior_linux_data): New.
14748 (linux_create_inferior): Use set_inferior_target_data.
14749 (linux_attach): Likewise. Call add_inferior.
14750 (linux_wait_for_one_inferior): New function.
14751 (linux_wait): Call it.
14752 (linux_write_memory): Add const.
14753 (initialize_low): Call set_breakpoint_data.
14754 * linux-low.h (struct linux_target_ops): Add breakpoint
14756 * server.c (attach_inferior): Remove extra add_inferior
14758 * server.h: Include mem-break.h. Update inferior.c
14760 * target.c (read_inferior_memory)
14761 (write_inferior_memory): New functions.
14762 * target.h (read_inferior_memory)
14763 (write_inferior_memory): Change macros to prototypes.
14764 (struct target_ops): Update comments. Add const to write_memory
14767 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14769 * linux-low.c (usr_store_inferior_registers): Support
14770 registers which are allowed to fail to store.
14771 * linux-low.h (linux_target_ops): Likewise.
14772 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14773 (ppc_cannot_store_register): FPSCR may not be storable.
14775 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14777 * server.h: Include <string.h> if HAVE_STRING_H.
14778 * ChangeLog: Correct paths in last ChangeLog entry.
14780 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14782 * linux-low.h: Remove obsolete prototypes.
14783 (struct linux_target_ops): New.
14784 (extern the_low_target): New.
14785 * linux-low.c (num_regs, regmap): Remove declarations.
14786 (register_addr): Use the_low_target explicitly.
14787 (fetch_register): Likewise.
14788 (usr_fetch_inferior_registers): Likewise.
14789 (usr_store_inferior_registers): Likewise.
14790 * linux-arm-low.c (num_regs): Remove.
14791 (arm_num_regs): Define.
14792 (arm_regmap): Renamed from regmap, made static.
14793 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14795 (arm_cannot_store_register): Renamed from cannot_store_register,
14797 (the_low_target): New.
14798 * linux-i386-low.c (num_regs): Remove.
14799 (i386_num_regs): Define.
14800 (i386_regmap): Renamed from regmap, made static.
14801 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14803 (i386_cannot_store_register): Renamed from cannot_store_register,
14805 (the_low_target): New.
14806 * linux-ia64-low.c (num_regs): Remove.
14807 (ia64_num_regs): Define.
14808 (ia64_regmap): Renamed from regmap, made static.
14809 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14811 (ia64_cannot_store_register): Renamed from cannot_store_register,
14813 (the_low_target): New.
14814 * linux-m68k-low.c (num_regs): Remove.
14815 (m68k_num_regs): Define.
14816 (m68k_regmap): Renamed from regmap, made static.
14817 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14819 (m68k_cannot_store_register): Renamed from cannot_store_register,
14821 (the_low_target): New.
14822 * linux-mips-low.c (num_regs): Remove.
14823 (mips_num_regs): Define.
14824 (mips_regmap): Renamed from regmap, made static.
14825 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14827 (mips_cannot_store_register): Renamed from cannot_store_register,
14829 (the_low_target): New.
14830 * linux-ppc-low.c (num_regs): Remove.
14831 (ppc_num_regs): Define.
14832 (ppc_regmap): Renamed from regmap, made static.
14833 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14835 (ppc_cannot_store_register): Renamed from cannot_store_register,
14837 (the_low_target): New.
14838 * linux-s390-low.c (num_regs): Remove.
14839 (s390_num_regs): Define.
14840 (s390_regmap): Renamed from regmap, made static.
14841 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14843 (s390_cannot_store_register): Renamed from cannot_store_register,
14845 (the_low_target): New.
14846 * linux-sh-low.c (num_regs): Remove.
14847 (sh_num_regs): Define.
14848 (sh_regmap): Renamed from regmap, made static.
14849 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14851 (sh_cannot_store_register): Renamed from cannot_store_register,
14853 (the_low_target): New.
14854 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14855 (the_low_target): New.
14857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14859 * Makefile.in: Add stamp-h target.
14860 * configure.in: Create stamp-h.
14861 * configure: Regenerated.
14863 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14865 * inferiors.c: New file.
14866 * target.c: New file.
14867 * target.h: New file.
14868 * Makefile.in: Add target.o and inferiors.o. Update
14870 * linux-low.c (inferior_pid): New static variable,
14871 moved from server.c.
14872 (linux_create_inferior): Renamed from create_inferior.
14873 Call add_inferior. Return 0 on success instead of a PID.
14874 (linux_attach): Renamed from myattach.
14875 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14876 (linux_thread_alive): Renamed from mythread_alive.
14877 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14879 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14880 (regsets_store_inferior_registers): Correct error message.
14881 Add missing ``return 0''.
14882 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14883 (linux_store_registers): Renamed from store_inferior_registers.
14884 (linux_read_memory): Renamed from read_inferior_memory.
14885 (linux_write_memory): Renamed from write_inferior_memory.
14886 (linux_target_ops): New structure.
14887 (initialize_low): Call set_target_ops ().
14888 * remote-utils.c (unhexify): New function.
14889 (hexify): New function.
14890 (input_interrupt): Send signals to ``signal_pid''.
14891 * server.c (inferior_pid): Remove.
14892 (start_inferior): Update create_inferior call.
14893 (attach_inferior): Call add_inferior.
14894 (handle_query): New function.
14895 (main): Call handle_query for `q' packets.
14896 * server.h: Include "target.h". Remove obsolete prototypes.
14897 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14899 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14901 * Makefile.in: Add WARN_CFLAGS. Update configury
14903 * configure.in: Check for <string.h>
14904 * configure: Regenerate.
14905 * config.in: Regenerate.
14906 * gdbreplay.c: Include needed system headers.
14907 (remote_open): Remove strchr prototype.
14908 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14909 * regcache.c (supply_register): Change buf argument to const void *.
14910 (supply_register_by_name): Likewise.
14911 (collect_register): Change buf argument to void *.
14912 (collect_register_by_name): Likewise.
14913 * regcache.h: Add missing prototypes.
14914 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14915 * server.c (handle_query): New function.
14916 (attached): New static variable, moved out of main.
14917 (main): Quiet longjmp clobber warnings.
14918 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14919 * utils.c (error): Remove NORETURN.