1 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3 * server.c (handle_v_cont): Initialize thread_resume::thread
6 2017-04-05 Pedro Alves <palves@redhat.com>
8 * configure: Regenerate.
10 2017-04-05 Pedro Alves <palves@redhat.com>
12 * gdbreplay.c (sync_error): Constify.
13 * linux-x86-low.c (push_opcode): Constify.
15 2017-04-05 Pedro Alves <palves@redhat.com>
17 * win32-low.c (get_child_debug_event)
18 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
19 Report TARGET_WAITKIND_SPURIOUS instead.
21 2017-04-05 Pedro Alves <palves@redhat.com>
23 * remote-utils.c (remote_prepare, remote_open): Constify.
24 * remote-utils.h (remote_prepare, remote_open): Constify.
25 * server.c (captured_main): Constify 'port' handling.
27 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
29 * Makefile.in (clean): Clear .deps.
31 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
33 * .gitignore: Remove generated files, replace with wildcard.
34 * (clean): Replace removal of generated files with wildcard.
35 (version.c): Replace with...
36 (version-generated.c): ...this.
37 (xml-builtin.c): Replace with...
38 (xml-builtin-generated.c): ...this.
39 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
40 (%.c: *regformats*): Replace with...
41 (%-generated.c: *regformats*): ...this.
43 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
45 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
46 (xtensa_fill_gregset): Call collect_register_by_name for
48 (xtensa_store_gregset): Call supply_register_by_name for
51 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
53 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
54 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
55 (xtensa_store_gregset): Call supply_register for all registers in
56 a0_regnum..a0_regnum + C0_NREGS range.
58 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
60 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
61 (ax-ipa.o: ax.c): Remove.
62 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
63 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
64 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
65 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
66 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
68 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
70 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
71 (print-utils-ipa.o: ../common/print-utils.c): Remove.
72 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
73 (errors-ipa.o: ../common/errors.c): Remove.
74 (format-ipa.o: ../common/format.c): Remove.
75 (common-utils-ipa.o: ../common/common-utils.c): Remove.
77 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
79 * Makefile.in (%-ipa.o: %.c): New rule.
80 (tracepoint-ipa.o: tracepoint.c): Remove.
81 (utils-ipa.o: utils.c): Remove.
82 (remote-utils-ipa.o: remote-utils.c): Remove.
83 (regcache-ipa.o: regcache.c): Remove.
84 (i386-linux-ipa.o: i386-linux.c): Remove.
85 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
86 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
87 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
88 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
89 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
90 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
91 (amd64-linux-ipa.o: amd64-linux.c): Remove.
92 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
93 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
94 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
95 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
96 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
97 (aarch64-ipa.o: aarch64.c): Remove.
98 (s390-linux32-ipa.o: s390-linux32.c): Remove.
99 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
100 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
101 (s390-linux64-ipa.o: s390-linux64.c): Remove.
102 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
103 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
104 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
105 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
106 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
107 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
108 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
109 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
110 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
111 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
112 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
113 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
114 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
115 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
116 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
117 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
118 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
119 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
120 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
121 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
122 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
123 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
124 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
125 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
126 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
127 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
128 (tdesc-ipa.o: tdesc.c): Remove.
129 (x32-linux-ipa.o: x32-linux.c): Remove.
130 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
131 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
133 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
135 * Makefile.in (%.o: ../arch/%.c): New rule.
136 (arm.o: ../arch/arm.c): Remove.
137 (arm-linux.o: ../arch/arm-linux.c): Remove.
138 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
139 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
141 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
143 * Makefile.in (%.o: ../nat/%.c): New rule.
144 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
145 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
146 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
147 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
148 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
149 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
150 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
151 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
152 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
153 (linux-personality.o: ../nat/linux-personality.c): Remove.
154 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
155 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
156 (x86-linux.o: ../nat/x86-linux.c): Remove.
157 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
158 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
160 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
162 * Makefile.in (%.o: ../common/%.c): New rule.
163 (signals.o: ../common/signals.c): Remove.
164 (print-utils.o: ../common/print-utils.c): Remove.
165 (rsp-low.o: ../common/rsp-low.c): Remove.
166 (common-utils.o: ../common/common-utils.c): Remove.
167 (posix-strerror.o: ../common/posix-strerror.c): Remove.
168 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
169 (vec.o: ../common/vec.c): Remove.
170 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
171 (xml-utils.o: ../common/xml-utils.c): Remove.
172 (ptid.o: ../common/ptid.c): Remove.
173 (buffer.o: ../common/buffer.c): Remove.
174 (format.o: ../common/format.c): Remove.
175 (filestuff.o: ../common/filestuff.c): Remove.
176 (agent.o: ../common/agent.c): Remove.
177 (errors.o: ../common/errors.c): Remove.
178 (environ.o: ../common/environ.c): Remove.
179 (common-debug.o: ../common/common-debug.c): Remove.
180 (cleanups.o: ../common/cleanups.c): Remove.
181 (common-exceptions.o: ../common/common-exceptions.c): Remove.
182 (fileio.o: ../common/fileio.c): Remove.
183 (common-regcache.o: ../common/common-regcache.c): Remove.
184 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
185 (new-op.o: ../common/new-op.c): Remove.
186 (btrace-common.o: ../common/btrace-common.c): Remove.
188 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
190 * Makefile.in (%.o: ../target/%.c): New rule.
191 (waitstatus.o: ../target/waitstatus.c): Remove.
193 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
196 (%.c: ../regformats/%.dat,
197 (%.c: ../regformats/arm/%.dat,
198 (%.c: ../regformats/i386/%.dat,
199 (%.c: ../regformats/rs6000/%.dat): New rules.
202 (arm-with-iwmmxt.c): Remove.
203 (arm-with-vfpv2.c): Remove.
204 (arm-with-vfpv3.c): Remove.
205 (arm-with-neon.c): Remove.
206 (reg-bfin.c): Remove.
207 (reg-cris.c): Remove.
208 (reg-crisv32.c): Remove.
210 (i386-linux.c): Remove.
211 (i386-avx.c): Remove.
212 (i386-avx-linux.c): Remove.
213 (i386-avx-avx512.c): Remove.
214 (i386-avx-avx512-linux.c): Remove.
215 (i386-mpx.c): Remove.
216 (i386-mpx-linux.c): Remove.
217 (i386-avx-mpx-avx512-pku.c): Remove.
218 (i386-avx-mpx-avx512-pku-linux.c): Remove.
219 (i386-avx-mpx.c): Remove.
220 (i386-avx-mpx-linux.c): Remove.
221 (i386-mmx.c): Remove.
222 (i386-mmx-linux.c): Remove.
223 (reg-ia64.c): Remove.
224 (reg-m32r.c): Remove.
225 (reg-m68k.c): Remove.
227 (mips-linux.c): Remove.
228 (mips-dsp-linux.c): Remove.
229 (mips64-linux.c): Remove.
230 (mips64-dsp-linux.c): Remove.
231 (nios2-linux.c): Remove.
232 (powerpc-32.c): Remove.
233 (powerpc-32l.c): Remove.
234 (powerpc-altivec32l.c): Remove.
235 (powerpc-cell32l.c): Remove.
236 (powerpc-vsx32l.c): Remove.
237 (powerpc-isa205-32l.c): Remove.
238 (powerpc-isa205-altivec32l.c): Remove.
239 (powerpc-isa205-vsx32l.c): Remove.
240 (powerpc-e500l.c): Remove.
241 (powerpc-64l.c): Remove.
242 (powerpc-altivec64l.c): Remove.
243 (powerpc-cell64l.c): Remove.
244 (powerpc-vsx64l.c): Remove.
245 (powerpc-isa205-64l.c): Remove.
246 (powerpc-isa205-altivec64l.c): Remove.
247 (powerpc-isa205-vsx64l.c): Remove.
248 (s390-linux32.c): Remove.
249 (s390-linux32v1.c): Remove.
250 (s390-linux32v2.c): Remove.
251 (s390-linux64.c): Remove.
252 (s390-linux64v1.c): Remove.
253 (s390-linux64v2.c): Remove.
254 (s390-te-linux64.c): Remove.
255 (s390-vx-linux64.c): Remove.
256 (s390-tevx-linux64.c): Remove.
257 (s390x-linux64.c): Remove.
258 (s390x-linux64v1.c): Remove.
259 (s390x-linux64v2.c): Remove.
260 (s390x-te-linux64.c): Remove.
261 (s390x-vx-linux64.c): Remove.
262 (s390x-tevx-linux64.c): Remove.
263 (tic6x-c64xp-linux.c): Remove.
264 (tic6x-c64x-linux.c): Remove.
265 (tic6x-c62x-linux.c): Remove.
267 (reg-sparc64.c): Remove.
270 (amd64-linux.c): Remove.
271 (amd64-avx.c): Remove.
272 (amd64-avx-linux.c): Remove.
273 (amd64-avx-avx512.c): Remove.
274 (amd64-avx-avx512-linux.c): Remove.
275 (amd64-mpx.c): Remove.
276 (amd64-mpx-linux.c): Remove.
277 (amd64-avx-mpx-avx512-pku.c): Remove.
278 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
279 (amd64-avx-mpx.c): Remove.
280 (amd64-avx-mpx-linux.c): Remove.
282 (x32-linux.c): Remove.
284 (x32-avx-linux.c): Remove.
285 (x32-avx-avx512.c): Remove.
286 (x32-avx-avx512-linux.c): Remove.
287 (reg-xtensa.c): Remove.
288 (reg-tilegx.c): Remove.
289 (reg-tilegx32.c): Remove.
291 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
293 * Makefile.in (SFILES): Add "common/environ.c".
294 (OBJS): Add "common/environ.h".
296 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
298 * configure.ac: Check if the fs_base and gs_base members of
299 `struct user_regs_struct' exist.
300 * config.in: Regenerated.
301 * configure: Likewise.
303 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
305 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
307 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
308 (get_next_pcs_syscall_next_pc): Likewise.
310 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
312 * win32-i386-low.c: Fix incorrect reference to a couple source files.
313 * nto-x86-low.c: Likewise.
315 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
317 * Makefile.in: Include disable-implicit-rules.mk.
319 2016-11-23 Pedro Alves <palves@redhat.com>
321 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
322 (debug_vprintf): Use std::chrono::steady_clock instead of
323 gettimeofday. Use '.' instead of ':'.
324 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
325 (get_timestamp): Use std::chrono::steady_clock instead of
328 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
330 * Makefile.in: Fix whitespace formatting.
332 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
334 * Makefile.in (SFILES, OBS): Flatten list and order
337 2016-11-23 Pedro Alves <palves@redhat.com>
339 * event-loop.c (handle_file_event): Use warning.
340 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
341 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
344 2016-11-23 Pedro Alves <palves@redhat.com>
346 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
348 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
349 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
350 debug_printf and debug_flush for debug output.
351 * server.c (handle_general_set): Likewise.
352 * thread-db.c (try_thread_db_load): Use debug_printf for debug
355 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
357 * Makefile.in (.c.o): Replace rule with ...
358 (%.o: %.c): ... this one.
360 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
362 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
363 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
365 * configure.ac: Remove checks for the make program.
366 * configure: Re-generate.
368 2016-10-28 Pedro Alves <palves@redhat.com>
370 * Makefile.in (CXX_DIALECT): Get from configure.
371 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
372 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
373 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
374 * config.in: Regenerate.
375 * configure: Regenerate.
377 2016-10-27 Yao Qi <yao.qi@linaro.org>
379 * linux-low.c (linux_supports_range_stepping): Return true if
380 can_software_single_step return true.
382 2016-10-27 Yao Qi <yao.qi@linaro.org>
384 * inferiors.c (find_inferior_in_random): New function.
385 * inferiors.h (find_inferior_in_random): Declare.
386 * linux-low.c (linux_wait_for_event_filtered): Call
387 find_inferior_in_random instead of find_inferior.
389 2016-10-27 Yao Qi <yao.qi@linaro.org>
391 * linux-low.c (linux_wait_1): If single-step breakpoints are
392 inserted, remove them.
394 2016-10-26 Pedro Alves <palves@redhat.com>
396 * linux-low.c (handle_extended_wait): Link parent/child fork
398 (linux_wait_1): Unlink them.
399 (linux_set_resume_request): Ignore resume requests for
400 already-resumed and unhandled fork child threads.
401 * linux-low.h (struct lwp_info) <fork_relative>: New field.
402 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
404 (handle_v_requests) <vCont>: Don't call require_running.
405 * server.h (in_queued_stop_replies): New declaration.
407 2016-10-24 Yao Qi <yao.qi@linaro.org>
410 * linux-aarch64-low.c (append_insns): Cast the return value to
413 2016-10-10 Yao Qi <yao.qi@linaro.org>
415 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
417 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
419 * target.c (target_supports_multi_process): New function, moved
421 * target.h (target_supports_multi_process): ... here. Remove
424 2016-10-05 Tom Tromey <tom@tromey.com>
427 * tracepoint.c (handle_tracepoint_bkpts): Check
428 ipa_error_tracepoint, not ipa_stopping_tracepoint.
430 2016-10-05 Yao Qi <yao.qi@linaro.org>
432 * configure.srv: Update the path of arm-*.xml files.
434 2016-10-05 Terry Guo <terry.guo@arm.com>
435 Yao Qi <yao.qi@linaro.org>
437 * Makefile.in: Adjust the path of rules.
438 * configure.srv: Update the path of xml files.
439 * regformats/arm-with-iwmmxt.dat: Regenerated.
440 * regformats/arm-with-neon.dat: Likewise.
441 * regformats/arm-with-vfpv2.dat: Likewise.
442 * regformats/arm-with-vfpv3.dat Likewise.
444 2016-09-30 Yao Qi <yao.qi@linaro.org>
447 * target.c (target_stop_and_wait): Don't call
448 target_continue_no_signal, use resume_stop instead.
450 2016-09-26 Yao Qi <yao.qi@linaro.org>
452 * linux-low.c (linux_wait_1): Call debug_exit.
454 2016-09-23 Pedro Alves <palves@redhat.com>
456 * Makefile.in (SFILES): Add common/new-op.c.
457 (OBS): Add common/new-op.o.
458 (new-op.o): New rule.
460 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
462 * .gitinore: Ignore more files.
464 2016-09-21 Yao Qi <yao.qi@linaro.org>
466 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
469 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
471 * server.c (start_inferior): Call target_mourn_inferior instead of
472 mourn_inferior; pass ptid_t argument to it.
474 (handle_target_event): Likewise.
475 * target.c (target_mourn_inferior): New function.
476 * target.h (mourn_inferior): Delete macro.
478 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
480 * linux-low.c (lwp_is_stepping): New function.
482 2016-09-06 Carl Love <cel@us.ibm.com>
484 * server.c (start_inferior): Fixed comment, requested comment change
485 didn't get updated correctly. Removed reference to ptrace () call as
486 it is only true on Linux systems.
488 2016-09-06 Carl Love <cel@us.ibm.com>
490 * server.c (start_inferior): Do not call
491 function target_post_create_inferior () if the
492 inferior process has already exited.
494 2016-09-05 Pedro Alves <palves@redhat.com>
496 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
497 (COMPILE.pre, CC_LD): Use CXX directly.
498 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
499 * acinclude.m4: Don't include build-with-cxx.m4.
500 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
501 * configure: Regenerate.
503 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
506 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
507 call writing data to own_buf.
509 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
511 * target.c (mywait): Call target_wait instead of
513 (target_wait): New function.
515 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
517 * server.c (start_inferior): New variable 'ptid'. Replace calls
518 to the_target->resume by target_continue{,_no_signal}, depending
520 * target.c (target_stop_and_wait): Call target_continue_no_signal
521 instead of the_target->resume.
522 (target_continue): New function.
524 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
526 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
528 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
531 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
533 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
534 * linux-arm-low.c (ps_get_thread_area): Likewise.
535 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
536 * linux-m68k-low.c (ps_get_thread_area): Likewise.
537 * linux-mips-low.c (ps_get_thread_area): Likewise.
538 * linux-nios2-low.c (ps_get_thread_area): Likewise.
539 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
540 * linux-x86-low.c (ps_get_thread_area): Likewise.
541 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
543 2016-08-19 Pedro Alves <palves@redhat.com>
545 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
547 2016-08-19 Pedro Alves <palves@redhat.com>
549 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
550 comment. Use memcpy instead of casting through unsigned long.
552 2016-08-19 Pedro Alves <palves@redhat.com>
554 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
555 allocating around 0x80000000.
557 2016-08-19 Pedro Alves <palves@redhat.com>
560 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
561 (x32-avx512-linux-ipa.o): New rules.
562 * configure.ac (x86_64-*-linux*): New x32 check.
563 * configure.srv (ipa_x32_linux_regobj): New.
564 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
565 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
567 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
569 * configure: Regenerate.
571 2016-08-09 Pedro Alves <palves@redhat.com>
574 * Makefile.in (OBS): Add signals-state-save-restore.o.
575 (signals-state-save-restore.o): New rule.
576 * config.in: Regenerate.
577 * configure: Regenerate.
578 * linux-low.c: Include "signals-state-save-restore.h".
579 (linux_create_inferior): Call
580 restore_original_signals_state.
581 * server.c: Include "dispositions-save-restore.h".
582 (captured_main): Call save_original_signals_state.
584 2016-08-05 Pedro Alves <palves@redhat.com>
586 * configure: Regenerate.
588 2016-08-04 Yao Qi <yao.qi@linaro.org>
590 * linux-low.c (regsets_fetch_inferior_registers): Check
591 errno is ESRCH or not.
593 2016-08-02 Yao Qi <yao.qi@linaro.org>
595 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
596 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
597 (thread_db_load_search): Update.
598 (try_thread_db_load_1): Don't look for td_ta_event_addr,
599 td_ta_set_event and td_ta_event_getmsg.
601 2016-07-26 Pedro Alves <palves@redhat.com>
604 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
605 of unsigned long for 64-bit registers and use uint32_t instead of
606 unsigned int for 32-bit registers.
608 2016-07-26 Pedro Alves <palves@redhat.com>
610 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
613 2016-07-21 Tom Tromey <tom@tromey.com>
615 * configure: Rebuild.
617 2016-07-21 Yao Qi <yao.qi@linaro.org>
619 * mem-break.c (find_gdb_breakpoint): Cast bp to
620 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
622 2016-07-21 Yao Qi <yao.qi@linaro.org>
624 * server.c (handle_v_requests): Support s and S actions
625 if target_supports_software_single_step return true.
627 2016-07-21 Yao Qi <yao.qi@linaro.org>
629 * linux-low.c (resume_stopped_resumed_lwps): If resume request
630 is resume_step, call maybe_hw_step.
631 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
633 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
635 (proceed_one_lwp): If resume request is resume_step, install
636 reinsert breakpoints and call maybe_hw_step.
638 2016-07-21 Yao Qi <yao.qi@linaro.org>
640 * linux-low.c (proceed_one_lwp): Declare.
641 (linux_resume_one_thread): Remove local variable 'step'.
642 Lift code enqueue signal. Call proceed_one_lwp instead of
643 linux_resume_one_lwp.
645 2016-07-21 Yao Qi <yao.qi@linaro.org>
647 * linux-low.c (linux_resume_one_thread): Call
648 enqueue_pending_signal.
650 2016-07-21 Yao Qi <yao.qi@linaro.org>
652 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
653 * inferiors.c (do_restore_current_thread_cleanup): New function.
654 (make_cleanup_restore_current_thread): Likewise.
655 * linux-low.c (install_software_single_step_breakpoints): Call
656 make_cleanup_restore_current_thread. Switch current_thread to
659 2016-07-21 Yao Qi <yao.qi@linaro.org>
661 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
662 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
663 (clone_one_breakpoint): Likewise.
664 (delete_reinsert_breakpoints): Change parameter to thread.
666 (has_reinsert_breakpoints): Likewise.
667 (uninsert_reinsert_breakpoints): Likewise.
668 (reinsert_reinsert_breakpoints): Likewise.
669 * mem-break.h (set_reinsert_breakpoint): Update declaration.
670 (delete_reinsert_breakpoints): Likewise.
671 (reinsert_reinsert_breakpoints): Likewise.
672 (uninsert_reinsert_breakpoints): Likewise.
673 (has_reinsert_breakpoints): Likewise.
675 2016-07-21 Yao Qi <yao.qi@linaro.org>
677 * inferiors.c (get_thread_process): Make parameter const.
678 * inferiors.h (get_thread_process): Update declaration.
679 * mem-break.c (clone_all_breakpoints): Remove all parameters.
680 Add new parameters child_thread and parent_thread. Callers
682 * mem-break.h (clone_all_breakpoints): Update declaration.
684 2016-07-21 Yao Qi <yao.qi@linaro.org>
686 * mem-break.c (struct breakpoint) <cond_list>: Remove.
687 <command_list, handler>: Remove.
688 (struct gdb_breakpoint): New.
689 (struct other_breakpoint): New.
690 (struct reinsert_breakpoint): New.
691 (is_gdb_breakpoint): New function.
692 (any_persistent_commands): Update command_list if
693 is_gdb_breakpoint returns true.
694 (set_breakpoint): Create breakpoints according to their types.
695 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
696 (set_gdb_breakpoint_1): Likewise.
697 (set_gdb_breakpoint): Likewise.
698 (clear_breakpoint_conditions): Change parameter type to
699 'struct gdb_breakpoint *'.
700 (clear_breakpoint_commands): Likewise.
701 (clear_breakpoint_conditions_and_commands): Likewise.
702 (add_condition_to_breakpoint): Likewise.
703 (add_breakpoint_condition): Likewise.
704 (add_commands_to_breakpoint): Likewise.
705 (check_breakpoints): Check other_breakpoint.
706 (clone_one_breakpoint): Clone breakpopint according to its type.
707 * mem-break.h (struct gdb_breakpoint): Declare.
708 (set_gdb_breakpoint): Update declaration.
709 (clear_breakpoint_conditions_and_commands): Likewise.
710 (add_breakpoint_condition): Likewise.
711 (add_breakpoint_commands): Likewise.
712 * server.c (process_point_options): Change parameter type to
713 'struct gdb_breakpoint *'.
715 2016-07-21 Yao Qi <yao.qi@linaro.org>
717 * mem-break.c (set_breakpoint_at): Rename it to ...
718 (set_breakpoint_type_at): ... it.
719 (set_breakpoint_at): Call set_breakpoint_type_at.
720 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
721 * mem-break.h (set_breakpoint_at): Update comments.
723 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
725 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
727 (nios2_store_gregset): Likewise.
729 2016-07-01 Pedro Alves <palves@redhat.com>
730 Antoine Tremblay <antoine.tremblay@ericsson.com>
732 * linux-low.c: Change interface to take the target lwp_info
733 pointer directly and return void. Handle detaching from a zombie
735 (linux_detach_lwp_callback): New function.
736 (linux_detach): Detach from the leader thread after detaching from
739 2016-06-28 Yao Qi <yao.qi@linaro.org>
741 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
742 for variable new_offset.
743 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
744 (aarch64_ftrace_insn_reloc_cb): Likewise.
745 (aarch64_ftrace_insn_reloc_tb): Likewise.
746 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
747 PRIx64 instead of PRIx32.
749 2016-06-28 Yao Qi <yao.qi@linaro.org>
751 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
752 (the_low_target): Install arm_get_syscall_trapinfo.
754 2016-06-28 Yao Qi <yao.qi@linaro.org>
756 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
758 (the_low_target): Install aarch64_get_syscall_trapinfo.
760 2016-06-28 Yao Qi <yao.qi@linaro.org>
762 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
764 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
765 Remove parameter sysno.
766 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
769 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
771 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
772 (s390_emit_ne_goto): Likewise.
773 (s390_emit_lt_goto): Likewise.
774 (s390_emit_le_goto): Likewise.
775 (s390_emit_gt_goto): Likewise.
776 (s390_emit_ge_goto): Likewise.
777 (s390x_emit_eq_goto): Likewise.
778 (s390x_emit_ne_goto): Likewise.
779 (s390x_emit_lt_goto): Likewise.
780 (s390x_emit_le_goto): Likewise.
781 (s390x_emit_gt_goto): Likewise.
782 (s390x_emit_ge_goto): Likewise.
783 (s390_emit_ops_impl): Mark variable static.
784 (s390x_emit_ops): Likewise.
786 2016-06-17 Yao Qi <yao.qi@linaro.org>
788 * linux-low.c (handle_extended_wait): Call
789 uninsert_reinsert_breakpoints for the parent process. Remove
790 reinsert breakpoints from the child process. Reinsert them to
791 the parent process when vfork is done.
792 * mem-break.c (uninsert_reinsert_breakpoints): New function.
793 (reinsert_reinsert_breakpoints): New function.
794 * mem-break.h (uninsert_reinsert_breakpoints): Declare
795 (reinsert_reinsert_breakpoints): Declare.
797 2016-06-17 Yao Qi <yao.qi@linaro.org>
799 * linux-low.c (handle_extended_wait): If the parent is doing
800 step-over, remove the reinsert breakpoints from the forked child.
802 2016-06-17 Yao Qi <yao.qi@linaro.org>
804 * linux-low.c (unsuspend_all_lwps): Declare.
805 (linux_low_filter_event): If thread exited, call finish_step_over.
806 If step-over is finished, unsuspend other threads.
808 2016-06-17 Yao Qi <yao.qi@linaro.org>
810 * linux-low.c (linux_resume_one_lwp_throw): Assert
811 has_reinsert_breakpoints returns false.
812 * mem-break.c (delete_disabled_breakpoints): Assert
813 bp type isn't reinsert_breakpoint.
815 2016-06-17 Yao Qi <yao.qi@linaro.org>
817 * linux-low.c (maybe_hw_step): New function.
818 (linux_resume_one_lwp_throw): Call maybe_hw_step.
819 (finish_step_over): Switch current_thread to lwp temporarily,
820 and assert has_reinsert_breakpoints returns true.
821 (proceed_one_lwp): Call maybe_hw_step.
822 * mem-break.c (has_reinsert_breakpoints): New function.
823 * mem-break.h (has_reinsert_breakpoints): Declare.
825 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
827 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
829 2016-05-17 Yao Qi <yao.qi@linaro.org>
831 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
832 instead of find_inferior.
834 2016-05-05 Yao Qi <yao.qi@linaro.org>
836 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
837 Initialize res to zero.
839 2016-05-05 Yao Qi <yao.qi@linaro.org>
841 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
844 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
846 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
847 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
848 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
850 2016-04-28 Par Olsson <par.olsson@windriver.com>
851 Simon Marchi <simon.marchi@ericsson.com>
853 * tracepoint.c (write_inferior_int8): New function.
854 (cmd_qtenable_disable): Write enable flag using
857 2016-04-25 Yao Qi <yao.qi@linaro.org>
859 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
860 (need_step_over_p): Return zero if the LWP has pending signals
861 can be delivered on software single step target.
863 2016-04-25 Yao Qi <yao.qi@linaro.org>
865 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
866 return instead of error.
868 2016-04-22 Yao Qi <yao.qi@linaro.org>
870 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
873 2016-04-22 Yao Qi <yao.qi@linaro.org>
875 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
876 signal when stepping over breakpoint with software single
879 2016-04-21 Pedro Alves <palves@redhat.com>
881 * linux-s390-low.c (s390_collect_ptrace_register)
882 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
884 (s390_check_regset): Use void * instead of gdb_byte *.
886 2016-04-20 Pedro Alves <palves@redhat.com>
888 * configure: Renegerate.
890 2016-04-20 Yao Qi <yao.qi@linaro.org>
892 * linux-aarch32-low.c: Include "arch/arm-linux.h".
893 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
895 (arm_store_gregset): Likewise.
897 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
899 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
900 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
901 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
902 (amd64-avx-mpx-linux.c): New rules.
903 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
904 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
905 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
906 (srv_amd64_regobj): Add amd64-avx-mpx.o.
907 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
908 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
909 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
910 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
911 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
912 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
913 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
914 * linux-x86-low.c (x86_linux_read_description): Add case for
915 X86_XSTATE_AVX_MPX_MASK.
916 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
917 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
918 init_registers_i386_avx_mpx_linux.
919 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
920 (initialize_low_tracepoint): Call
921 init_registers_i386_avx_mpx_linux.
922 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
923 (initialize_low_tracepoint): Call
924 init_registers_amd64_avx_mpx_linux.
925 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
926 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
927 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
930 2016-04-18 Pedro Alves <palves@redhat.com>
932 * configure: Regenerate.
934 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
936 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
937 (aarch64_emit_sub): Likewise.
939 2016-04-12 Pedro Alves <palves@redhat.com>
941 * utils.c (prepare_to_throw_exception): Delete.
943 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
945 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
947 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
949 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
951 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
953 * linux-aarch64-ipa.c: Add <elf.h> include.
954 * linux-ppc-ipa.c: Add <elf.h> include.
955 * linux-s390-ipa.c: Add <elf.h> include.
957 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
959 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
960 (get_raw_reg_ptr): Likewise.
961 (get_trace_state_variable_value_ptr): Likewise.
962 (set_trace_state_variable_value_ptr): Likewise.
963 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
966 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
967 Marcin Kościelnicki <koriakin@0x04.net>
970 * linux-ppc-low.c (emit_insns): New function.
971 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
972 (ppc_emit_prologue): New function.
973 (ppc_emit_epilogue): New function.
974 (ppc_emit_add): New function.
975 (ppc_emit_sub): New function.
976 (ppc_emit_mul): New function.
977 (ppc_emit_lsh): New function.
978 (ppc_emit_rsh_signed): New function.
979 (ppc_emit_rsh_unsigned): New function.
980 (ppc_emit_ext): New function.
981 (ppc_emit_zero_ext): New function.
982 (ppc_emit_log_not): New function.
983 (ppc_emit_bit_and): New function.
984 (ppc_emit_bit_or): New function.
985 (ppc_emit_bit_xor): New function.
986 (ppc_emit_bit_not): New function.
987 (ppc_emit_equal): New function.
988 (ppc_emit_less_signed): New function.
989 (ppc_emit_less_unsigned): New function.
990 (ppc_emit_ref): New function.
991 (ppc_emit_const): New function.
992 (ppc_emit_reg): New function.
993 (ppc_emit_pop): New function.
994 (ppc_emit_stack_flush): New function.
995 (ppc_emit_swap): New function.
996 (ppc_emit_stack_adjust): New function.
997 (ppc_emit_call): New function.
998 (ppc_emit_int_call_1): New function.
999 (ppc_emit_void_call_2): New function.
1000 (ppc_emit_if_goto): New function.
1001 (ppc_emit_goto): New function.
1002 (ppc_emit_eq_goto): New function.
1003 (ppc_emit_ne_goto): New function.
1004 (ppc_emit_lt_goto): New function.
1005 (ppc_emit_le_goto): New function.
1006 (ppc_emit_gt_goto): New function.
1007 (ppc_emit_ge_goto): New function.
1008 (ppc_write_goto_address): New function.
1009 (ppc_emit_ops_impl): New static variable.
1010 (ppc64v1_emit_prologue): New function.
1011 (ppc64v2_emit_prologue): New function.
1012 (ppc64_emit_epilogue): New function.
1013 (ppc64_emit_add): New function.
1014 (ppc64_emit_sub): New function.
1015 (ppc64_emit_mul): New function.
1016 (ppc64_emit_lsh): New function.
1017 (ppc64_emit_rsh_signed): New function.
1018 (ppc64_emit_rsh_unsigned): New function.
1019 (ppc64_emit_ext): New function.
1020 (ppc64_emit_zero_ext): New function.
1021 (ppc64_emit_log_not): New function.
1022 (ppc64_emit_bit_and): New function.
1023 (ppc64_emit_bit_or): New function.
1024 (ppc64_emit_bit_xor): New function.
1025 (ppc64_emit_bit_not): New function.
1026 (ppc64_emit_equal): New function.
1027 (ppc64_emit_less_signed): New function.
1028 (ppc64_emit_less_unsigned): New function.
1029 (ppc64_emit_ref): New function.
1030 (ppc64_emit_const): New function.
1031 (ppc64v1_emit_reg): New function.
1032 (ppc64v2_emit_reg): New function.
1033 (ppc64_emit_pop): New function.
1034 (ppc64_emit_stack_flush): New function.
1035 (ppc64_emit_swap): New function.
1036 (ppc64v1_emit_call): New function.
1037 (ppc64v2_emit_call): New function.
1038 (ppc64v1_emit_int_call_1): New function.
1039 (ppc64v2_emit_int_call_1): New function.
1040 (ppc64v1_emit_void_call_2): New function.
1041 (ppc64v2_emit_void_call_2): New function.
1042 (ppc64_emit_if_goto): New function.
1043 (ppc64_emit_eq_goto): New function.
1044 (ppc64_emit_ne_goto): New function.
1045 (ppc64_emit_lt_goto): New function.
1046 (ppc64_emit_le_goto): New function.
1047 (ppc64_emit_gt_goto): New function.
1048 (ppc64_emit_ge_goto): New function.
1049 (ppc64v1_emit_ops_impl): New static variable.
1050 (ppc64v2_emit_ops_impl): New static variable.
1051 (ppc_emit_ops): New function.
1052 (linux_low_target): Wire in ppc_emit_ops.
1054 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1055 Marcin Kościelnicki <koriakin@0x04.net>
1058 * Makefile.in: Add powerpc-*-ipa.o
1059 * configure.srv: Add ipa_obj for powerpc*-linux.
1060 * linux-ppc-ipa.c: New file.
1061 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1063 (PPC_FIELD): New macro.
1064 (PPC_SEXT): New macro.
1065 (PPC_OP6): New macro.
1066 (PPC_BO): New macro.
1067 (PPC_LI): New macro.
1068 (PPC_BD): New macro.
1069 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1070 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1071 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1072 (ppc_get_thread_area): New function.
1073 (is_elfv2_inferior): New function.
1074 (gen_ds_form): New function.
1075 (GEN_STD): New macro.
1076 (GEN_STDU): New macro.
1077 (GEN_LD): New macro.
1078 (GEN_LDU): New macro.
1079 (gen_d_form): New function.
1080 (GEN_ADDI): New macro.
1081 (GEN_ADDIS): New macro.
1082 (GEN_LI): New macro.
1083 (GEN_LIS): New macro.
1084 (GEN_ORI): New macro.
1085 (GEN_ORIS): New macro.
1086 (GEN_LWZ): New macro.
1087 (GEN_STW): New macro.
1088 (GEN_STWU): New macro.
1089 (gen_xfx_form): New function.
1090 (GEN_MFSPR): New macro.
1091 (GEN_MTSPR): New macro.
1092 (GEN_MFCR): New macro.
1093 (GEN_MTCR): New macro.
1094 (GEN_SYNC): New macro.
1095 (GEN_LWSYNC): New macro.
1096 (gen_x_form): New function.
1097 (GEN_OR): New macro.
1098 (GEN_MR): New macro.
1099 (GEN_LWARX): New macro.
1100 (GEN_STWCX): New macro.
1101 (GEN_CMPW): New macro.
1102 (gen_md_form): New function.
1103 (GEN_RLDICL): New macro.
1104 (GEN_RLDICR): New macro.
1105 (gen_i_form): New function.
1107 (GEN_BL): New macro.
1108 (gen_b_form): New function.
1109 (GEN_BNE): New macro.
1110 (GEN_LOAD): New macro.
1111 (GEN_STORE): New macro.
1112 (gen_limm): New function.
1113 (gen_atomic_xchg): New function.
1114 (gen_call): New function.
1115 (ppc_relocate_instruction): New function.
1116 (ppc_install_fast_tracepoint_jump_pad): New function.
1117 (ppc_get_min_fast_tracepoint_insn_len): New function.
1118 (ppc_get_ipa_tdesc_idx): New function.
1119 (the_low_target): Wire in the new functions.
1120 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1122 * linux-ppc-tdesc.h: New file.
1124 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1126 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1127 (alloc_jump_pad_buffer): New function.
1128 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1129 (alloc_jump_pad_buffer): New function.
1130 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1131 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1132 (alloc_jump_pad_buffer): New function.
1133 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1134 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1135 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1136 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1138 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1140 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1141 * linux-amd64-ipa.c: Likewise.
1142 * linux-i386-ipa.c: Likewise.
1143 * linux-s390-ipa.c: Likewise.
1144 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1145 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1146 set_trace_state_variable_value_ptr.
1147 (struct ipa_sym_addresses): Likewise.
1148 (symbol_list): Likewise.
1149 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1150 accessing gdb_collect directly.
1151 (gdb_collect_ptr_type): New typedef.
1152 (get_raw_reg_ptr_type): New typedef.
1153 (get_trace_state_variable_value_ptr_type): New typedef.
1154 (set_trace_state_variable_value_ptr_type): New typedef.
1155 (gdb_collect_ptr): New global.
1156 (get_raw_reg_ptr): New global.
1157 (get_trace_state_variable_value_ptr): New global.
1158 (set_trace_state_variable_value_ptr): New global.
1159 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1160 accessing get_raw_reg directly.
1161 (get_get_tsv_func_addr): Likewise for
1162 get_trace_state_variable_value_ptr.
1163 (get_set_tsv_func_addr): Likewise for
1164 set_trace_state_variable_value_ptr.
1165 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1167 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1169 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1171 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1173 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1175 (relocate_instruction): Remove own_buf.
1176 * server.c (own_buf): Make global.
1177 (handle_v_requests): Make global.
1178 * server.h (own_buf): New declaration.
1179 (handle_v_requests): New prototype.
1181 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1184 * linux-s390-low.c (add_insns): New function.
1185 (s390_emit_prologue): New function.
1186 (s390_emit_epilogue): New function.
1187 (s390_emit_add): New function.
1188 (s390_emit_sub): New function.
1189 (s390_emit_mul): New function.
1190 (s390_emit_lsh): New function.
1191 (s390_emit_rsh_signed): New function.
1192 (s390_emit_rsh_unsigned): New function.
1193 (s390_emit_ext): New function.
1194 (s390_emit_log_not): New function.
1195 (s390_emit_bit_and): New function.
1196 (s390_emit_bit_or): New function.
1197 (s390_emit_bit_xor): New function.
1198 (s390_emit_bit_not): New function.
1199 (s390_emit_equal): New function.
1200 (s390_emit_less_signed): New function.
1201 (s390_emit_less_unsigned): New function.
1202 (s390_emit_ref): New function.
1203 (s390_emit_if_goto): New function.
1204 (s390_emit_goto): New function.
1205 (s390_write_goto_address): New function.
1206 (s390_emit_litpool): New function.
1207 (s390_emit_const): New function.
1208 (s390_emit_call): New function.
1209 (s390_emit_reg): New function.
1210 (s390_emit_pop): New function.
1211 (s390_emit_stack_flush): New function.
1212 (s390_emit_zero_ext): New function.
1213 (s390_emit_swap): New function.
1214 (s390_emit_stack_adjust): New function.
1215 (s390_emit_set_r2): New function.
1216 (s390_emit_int_call_1): New function.
1217 (s390_emit_void_call_2): New function.
1218 (s390_emit_eq_goto): New function.
1219 (s390_emit_ne_goto): New function.
1220 (s390_emit_lt_goto): New function.
1221 (s390_emit_le_goto): New function.
1222 (s390_emit_gt_goto): New function.
1223 (s390_emit_ge_goto): New function.
1224 (s390x_emit_prologue): New function.
1225 (s390x_emit_epilogue): New function.
1226 (s390x_emit_add): New function.
1227 (s390x_emit_sub): New function.
1228 (s390x_emit_mul): New function.
1229 (s390x_emit_lsh): New function.
1230 (s390x_emit_rsh_signed): New function.
1231 (s390x_emit_rsh_unsigned): New function.
1232 (s390x_emit_ext): New function.
1233 (s390x_emit_log_not): New function.
1234 (s390x_emit_bit_and): New function.
1235 (s390x_emit_bit_or): New function.
1236 (s390x_emit_bit_xor): New function.
1237 (s390x_emit_bit_not): New function.
1238 (s390x_emit_equal): New function.
1239 (s390x_emit_less_signed): New function.
1240 (s390x_emit_less_unsigned): New function.
1241 (s390x_emit_ref): New function.
1242 (s390x_emit_if_goto): New function.
1243 (s390x_emit_const): New function.
1244 (s390x_emit_call): New function.
1245 (s390x_emit_reg): New function.
1246 (s390x_emit_pop): New function.
1247 (s390x_emit_stack_flush): New function.
1248 (s390x_emit_zero_ext): New function.
1249 (s390x_emit_swap): New function.
1250 (s390x_emit_stack_adjust): New function.
1251 (s390x_emit_int_call_1): New function.
1252 (s390x_emit_void_call_2): New function.
1253 (s390x_emit_eq_goto): New function.
1254 (s390x_emit_ne_goto): New function.
1255 (s390x_emit_lt_goto): New function.
1256 (s390x_emit_le_goto): New function.
1257 (s390x_emit_gt_goto): New function.
1258 (s390x_emit_ge_goto): New function.
1259 (s390_emit_ops): New function.
1260 (struct linux_target_ops): Fill in emit_ops hook.
1262 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1265 * Makefile.in: Add s390 IPA files.
1266 * configure.srv: Build IPA for s390.
1267 * linux-s390-ipa.c: New file.
1268 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1269 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1270 (tdesc_s390_linux32): Likewise.
1271 (init_registers_s390_linux32v1): Likewise.
1272 (tdesc_s390_linux32v1): Likewise.
1273 (init_registers_s390_linux32v2): Likewise.
1274 (tdesc_s390_linux32v2): Likewise.
1275 (init_registers_s390_linux64): Likewise.
1276 (tdesc_s390_linux64): Likewise.
1277 (init_registers_s390_linux64v1): Likewise.
1278 (tdesc_s390_linux64v1): Likewise.
1279 (init_registers_s390_linux64v2): Likewise.
1280 (tdesc_s390_linux64v2): Likewise.
1281 (init_registers_s390_te_linux64): Likewise.
1282 (tdesc_s390_te_linux64): Likewise.
1283 (init_registers_s390_vx_linux64): Likewise.
1284 (tdesc_s390_vx_linux64): Likewise.
1285 (init_registers_s390_tevx_linux64): Likewise.
1286 (tdesc_s390_tevx_linux64): Likewise.
1287 (init_registers_s390x_linux64): Likewise.
1288 (tdesc_s390x_linux64): Likewise.
1289 (init_registers_s390x_linux64v1): Likewise.
1290 (tdesc_s390x_linux64v1): Likewise.
1291 (init_registers_s390x_linux64v2): Likewise.
1292 (tdesc_s390x_linux64v2): Likewise.
1293 (init_registers_s390x_te_linux64): Likewise.
1294 (tdesc_s390x_te_linux64): Likewise.
1295 (init_registers_s390x_vx_linux64): Likewise.
1296 (tdesc_s390x_vx_linux64): Likewise.
1297 (init_registers_s390x_tevx_linux64): Likewise.
1298 (tdesc_s390x_tevx_linux64): Likewise.
1299 (have_hwcap_s390_vx): New static variable.
1300 (s390_arch_setup): Fill have_hwcap_s390_vx.
1301 (s390_get_thread_area): New function.
1302 (s390_ft_entry_gpr_esa): New const.
1303 (s390_ft_entry_gpr_zarch): New const.
1304 (s390_ft_entry_misc): New const.
1305 (s390_ft_entry_fr): New const.
1306 (s390_ft_entry_vr): New const.
1307 (s390_ft_main_31): New const.
1308 (s390_ft_main_64): New const.
1309 (s390_ft_exit_fr): New const.
1310 (s390_ft_exit_vr): New const.
1311 (s390_ft_exit_misc): New const.
1312 (s390_ft_exit_gpr_esa): New const.
1313 (s390_ft_exit_gpr_zarch): New const.
1314 (append_insns): New function.
1315 (s390_relocate_instruction): New function.
1316 (s390_install_fast_tracepoint_jump_pad): New function.
1317 (s390_get_min_fast_tracepoint_insn_len): New function.
1318 (s390_get_ipa_tdesc_idx): New function.
1319 (struct linux_target_ops): Wire in the above functions.
1320 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1321 * linux-s390-tdesc.h: New file.
1323 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1325 * linux-s390-low.c (s390_supports_tracepoints): New function.
1326 (struct linux_target_ops): Fill supports_tracepoints hook.
1328 2016-03-18 Yao Qi <yao.qi@linaro.org>
1330 * linux-low.c (lwp_signal_can_be_delivered): New function.
1331 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1333 2016-03-18 Yao Qi <yao.qi@linaro.org>
1335 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1336 0 if signal is enqueued. Remove 'signal' from one debugging
1337 message. Move one debugging message to some lines below.
1338 Remove code setting 'signal' to 0.
1340 2016-03-18 Yao Qi <yao.qi@linaro.org>
1342 * linux-low.c (linux_low_filter_event): Remove redundant
1343 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1345 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1347 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1348 (struct linux_target_ops): Wire in the above.
1350 2016-03-03 Yao Qi <yao.qi@linaro.org>
1352 * linux-low.c: Update comments to start_step_over.
1354 2016-03-03 Yao Qi <yao.qi@linaro.org>
1357 * linux-low.c (handle_extended_wait): Set child suspended
1358 if event_lwp->bp_reinsert isn't zero.
1360 2016-03-02 Yao Qi <yao.qi@linaro.org>
1362 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1363 enqueue_pending_signal.
1365 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1367 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1370 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1372 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1373 (s390_regmap_3264) [!__s390x__]: New global.
1374 (s390_collect_ptrace_register): Skip map entries containing -1.
1375 (s390_supply_ptrace_register): Ditto.
1376 (s390_fill_gprs_high): New function.
1377 (s390_store_gprs_high): New function.
1378 (s390_regsets): Add NT_S390_HIGH_GPRS.
1379 (s390_get_hwcap): Enable on 31-bit.
1380 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1381 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1382 Detect NT_S390_HIGH_GPRS.
1383 (s390_usrregs_info_3264): Enable on 31-bit.
1384 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1385 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1387 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1390 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1391 * configure.srv: Ditto.
1392 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1393 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1394 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1395 (init_registers_amd64_linux): Remove prototype.
1396 (tdesc_amd64_linux): Remove declaration.
1397 (get_ipa_tdesc): New function.
1398 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1399 initialize remaining tdescs.
1400 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1401 (init_registers_i386_linux): Remove prototype.
1402 (tdesc_i386_linux): Remove declaration.
1403 (get_ipa_tdesc): New function.
1404 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1405 initialize remaining tdescs.
1406 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1407 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1408 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1409 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1410 (x86_get_ipa_tdesc_idx): New function.
1411 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1412 * linux-x86-tdesc.h: New file.
1413 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1414 (target_get_ipa_tdesc_idx): New macro.
1415 * tracepoint.c (ipa_tdesc_idx): New macro.
1416 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1417 (symbol_list): Add ipa_tdesc_idx.
1418 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1419 (ipa_tdesc): Remove.
1420 (ipa_tdesc_idx): New variable.
1421 (get_context_regcache): Use get_ipa_tdesc.
1422 (gdb_collect): Ditto.
1424 * tracepoint.h (get_ipa_tdesc): New prototype.
1425 (ipa_tdesc): Remove.
1427 2016-02-24 Pedro Alves <palves@redhat.com>
1429 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1430 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1431 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1432 Factor out common code between the USE_SIGTRAP_SIGINFO and
1433 !USE_SIGTRAP_SIGINFO blocks.
1434 (linux_low_filter_event): Call save_stop_reason instead of
1435 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1437 (linux_wait_1): Update comments.
1439 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1441 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1442 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1443 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1444 ppc_insert_point, ppc_remove_point.
1446 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1448 * linux-s390-low.c (s390_supports_z_point_type): New function.
1449 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1451 2016-02-16 Yao Qi <yao.qi@linaro.org>
1453 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1454 PC. Get pc from regcache_read_pc.
1456 2016-02-12 Yao Qi <yao.qi@linaro.org>
1458 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1459 or linux_get_pc_32bit.
1460 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1462 2016-02-12 Yao Qi <yao.qi@linaro.org>
1464 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1465 arm_linux_get_next_pcs_fixup.
1467 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1469 * tracepoint.c (x_tracepoint_action_download): Change
1470 write_inferior_data_ptr to write_inferior_data_pointer.
1471 (cmd_qtstart): Likewise.
1472 (write_inferior_data_ptr): Remove.
1473 (download_agent_expr): Change write_inferior_data_ptr to
1474 write_inferior_data_pointer.
1475 (download_tracepoint_1): Likewise.
1476 (download_tracepoint): Likewise.
1477 (download_trace_state_variables): Likewise.
1479 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1480 Marcin Kościelnicki <koriakin@0x04.net>
1482 * tracepoint.c (struct tracepoint_action_ops): Remove.
1483 (struct tracepoint_action): Remove ops.
1484 (m_tracepoint_action_download, r_tracepoint_action_download)
1485 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1486 size and offset accordingly.
1487 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1488 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1489 (tracepoint_action_send, tracepoint_action_download): New functions.
1490 Helpers for trace action handlers.
1491 (add_tracepoint_action): Remove setup actions ops.
1492 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1494 2016-02-10 Yao Qi <yao.qi@linaro.org>
1496 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1498 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1500 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1502 * configure: Regenerate.
1504 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1506 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1507 void * to gdb_byte *.
1508 * linux-low.c (siginfo_fixup): Likewise.
1509 (linux_xfer_siginfo): Likewise.
1510 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1512 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1514 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1516 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1518 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1520 * linux-x86-low.c [__x86_64__]: Include
1521 "nat/amd64-linux-siginfo.h".
1522 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1523 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1524 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1525 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1526 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1527 (cpt_si_fd, si_timerid, si_overrun): Move from
1528 nat/amd64-linux-siginfo.c.
1529 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1531 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1533 * server.c (skip_to_semicolon): Remove.
1534 (process_point_options): Use strchrnul instead of
1537 2016-01-26 Yao Qi <yao.qi@linaro.org>
1539 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1540 * linux-low.c (install_software_single_step_breakpoints): Don't
1541 call regcache_read_pc.
1542 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1545 2016-01-26 Yao Qi <yao.qi@linaro.org>
1547 * linux-low.c (install_software_single_step_breakpoints): Call
1548 regcache_read_pc instead of get_pc.
1550 2016-01-26 Yao Qi <yao.qi@linaro.org>
1552 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1553 (unblock_async_io): Rename to ...
1554 (block_unblock_async_io): ... it. New function.
1555 (enable_async_io): Don't install SIGIO handler. Unblock it
1557 (disable_async_io): Don't ignore SIGIO. Block it instead.
1558 (initialize_async_io): Install SIGIO handler. Don't call
1561 2016-01-26 Yao Qi <yao.qi@linaro.org>
1563 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1564 first character is '\003', call *the_target->request_interrupt.
1566 2016-01-25 Yao Qi <yao.qi@linaro.org>
1568 * remote-utils.c (new_thread_notify): Remove.
1569 (dead_thread_notify): Likewise.
1570 * remote-utils.h (new_thread_notify): Remove declaration.
1571 (dead_thread_notify): Likewise.
1573 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1575 * gdb.trace/pending.exp: Fix expected message on continue.
1577 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1579 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1580 it works properly on big-endian machines where sizeof (CORE_ADDR)
1583 2016-01-21 Pedro Alves <palves@redhat.com>
1585 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1586 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1587 * configure: Regenerate.
1589 2016-01-21 Yao Qi <yao.qi@linaro.org>
1591 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1592 is_thumb and set it according to CPSR saved on the stack.
1593 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1594 arm_sigreturn_next_pc.
1596 2016-01-18 Yao Qi <yao.qi@linaro.org>
1598 * linux-low.c (linux_set_pc_64bit): New function.
1599 (linux_get_pc_64bit): New function.
1600 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1602 * linux-sparc-low.c (debug_threads): Remove declaration.
1603 (sparc_get_pc): Remove.
1604 (the_low_target): Use linux_get_pc_64bit instead of
1606 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1607 (the_low_target): Use linux_get_pc_64bit and
1610 2016-01-18 Yao Qi <yao.qi@linaro.org>
1612 * linux-arm-low.c (debug_threads): Remove declaration.
1613 (arm_get_pc, arm_set_pc): Remove.
1614 (the_low_target): Use linux_get_pc_32bit and
1616 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1617 (the_low_target): Use linux_get_pc_32bit and
1619 * linux-cris-low.c (debug_threads): Remove declaration.
1620 (cris_get_pc, cris_set_pc,): Remove.
1621 (the_low_target): Use linux_get_pc_32bit and
1623 * linux-crisv32-low.c (debug_threads): Remove declaration.
1624 (cris_get_pc, cris_set_pc): Remove.
1625 (the_low_target): Use linux_get_pc_32bit and
1627 * linux-low.c: Include inttypes.h.
1628 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1629 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1630 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1631 (the_low_target): Use linux_get_pc_32bit and
1633 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1634 (the_low_target): Use linux_get_pc_32bit and
1636 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1637 (the_low_target): Use linux_get_pc_32bit and
1639 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1640 (the_low_target): Use linux_get_pc_32bit and
1642 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1643 (the_low_target): Use linux_get_pc_32bit and
1646 2016-01-18 Gary Benson <gbenson@redhat.com>
1648 * configure.ac (AC_FUNC_FORK): New check.
1649 * config.in: Regenerate.
1650 * configure: Likewise.
1652 2016-01-14 Yao Qi <yao.qi@linaro.org>
1654 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1655 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1656 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1657 arm_get_next_pcs_ctor.
1659 2016-01-12 Josh Stone <jistone@redhat.com>
1660 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1662 * inferiors.h: Include "gdb_vecs.h".
1663 (struct process_info): Add syscalls_to_catch.
1664 * inferiors.c (remove_process): Free syscalls_to_catch.
1665 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1666 syscall_return stops.
1667 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1668 * server.c (handle_general_set): Handle QCatchSyscalls.
1669 (handle_query): Report support for QCatchSyscalls.
1670 * target.h (struct target_ops): Add supports_catch_syscall.
1671 (target_supports_catch_syscall): New macro.
1672 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1673 (struct lwp_info): Add syscall_state.
1674 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1675 Maintain syscall_state and syscalls_to_catch across exec.
1676 (get_syscall_trapinfo): New function, proxy to the_low_target.
1677 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1678 (linux_low_filter_event): Toggle syscall_state entry/return for
1679 syscall traps, and set it ignored for all others.
1680 (gdb_catching_syscalls_p): New function.
1681 (gdb_catch_this_syscall_p): New function.
1682 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1683 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1684 (linux_supports_catch_syscall): New function.
1685 (linux_target_ops): Install it.
1686 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1687 (the_low_target): Install it.
1689 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1691 * acinclude.m4: Include new ../warning.m4 file.
1692 * configure: Regenerated.
1693 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1695 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1697 * ax.c (is_goto_target): Mark static.
1698 * linux-low.c (register_addr): Likewise.
1699 (linux_fetch_registers, linux_store_registers): Likewise.
1700 * mem-break.c (any_persistent_commands): Fix old prototype.
1701 (add_commands_to_breakpoint): Mark static.
1702 * regcache.c (find_register_by_name): Delete unused func.
1703 * remote-utils.c (hex_or_minus_one): Mark static.
1704 * server.c (monitor_show_help): Mark static.
1705 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1706 handle_v_requests): Likewise.
1708 2016-01-12 Pedro Alves <palves@redhat.com>
1710 Remove use of the registered trademark symbol throughout.
1712 2016-01-08 Yao Qi <yao.qi@linaro.org>
1714 * remote-utils.c (getpkt): If c is '\003', call target hook
1717 2016-01-06 Yao Qi <yao.qi@linaro.org>
1719 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1720 linux-aarch32-low.c.
1721 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1722 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1723 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1724 (thumb2_breakpoint): Declare.
1725 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1726 linux-aarch32-low.h.
1727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1728 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1729 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1731 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1733 * gdbreplay.c (gdbreplay_version): Change copyright year in
1735 * server.c (gdbserver_version): Likewise.
1737 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1739 * server.c (crc32_table): Delete.
1740 (crc32): Use libiberty's xcrc32 function.
1742 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1744 * lynx-low.c (lynx_delete_thread_callback): New function.
1745 (lynx_mourn): Properly delete our process and all of its
1746 threads. Remove call to clear_inferiors.
1748 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1750 * target.c (thread_search_callback): Add check that
1751 the thread_stopped target callback is not NULL before
1754 2015-12-21 Yao Qi <yao.qi@linaro.org>
1756 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1759 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1761 * server.c (handle_query): Call target_supports_software_single_step.
1763 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1765 * linux-low.c (single_step): New function.
1766 (linux_resume_one_lwp_throw): Call single_step.
1767 (start_step_over): Likewise.
1769 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1771 * Makefile.in (SFILES): Append arch/arm-linux.c,
1772 arch/arm-get-next-pcs.c.
1773 (arm-linux.o): New rule.
1774 (arm-get-next-pcs.o): New rule.
1775 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1777 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1778 to linux-aarch32-low.c.
1779 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1780 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1781 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1782 (thumb2_breakpoint_len): Likewise.
1783 (arm_is_thumb_mode): Make non-static.
1784 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1785 from linux-aarch32-low.c.
1786 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1787 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1788 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1789 (thumb2_breakpoint_len): Likewise.
1790 (arm_is_thumb_mode): New declaration.
1791 * linux-arm-low.c: Include arch/arm-linux.h
1792 aarch/arm-get-next-pcs.h, sys/syscall.h.
1793 (get_next_pcs_ops): New struct.
1794 (get_next_pcs_addr_bits_remove): New function.
1795 (get_next_pcs_is_thumb): New function.
1796 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1797 (arm_sigreturn_next_pc): Likewise.
1798 (get_next_pcs_syscall_next_pc): Likewise.
1799 (arm_gdbserver_get_next_pcs): Likewise.
1800 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1802 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1803 * server.h: Include gdb_vecs.h.
1805 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1807 * Makefile.in (SFILES): Append common/common-regcache.c.
1808 (OBS): Append common-regcache.o.
1809 (common-regcache.o): New rule.
1810 * regcache.c (init_register_cache): Initialize cache to
1812 (regcache_raw_read_unsigned): New function.
1813 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1814 register_status enum.
1816 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1818 * linux-aarch64-low.c (the_low_targets): Rename
1819 breakpoint_reinsert_addr to get_next_pcs.
1820 * linux-arm-low.c (the_low_targets): Likewise.
1821 * linux-bfin-low.c (the_low_targets): Likewise.
1822 * linux-cris-low.c (the_low_targets): Likewise.
1823 * linux-crisv32-low.c (the_low_targets): Likewise.
1824 * linux-low.c (can_software_single_step): Likewise.
1825 (install_software_single_step_breakpoints): New function.
1826 (start_step_over): Use install_software_single_step_breakpoints.
1827 * linux-low.h: New CORE_ADDR vector.
1828 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1830 * linux-mips-low.c (the_low_targets): Likewise.
1831 * linux-nios2-low.c (the_low_targets): Likewise.
1832 * linux-sparc-low.c (the_low_targets): Likewise.
1834 2015-12-17 Pedro Alves <palves@redhat.com>
1836 * linux-low.c (linux_kill_one_lwp): Remove references to
1838 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1840 (linux_init_signals): Delete.
1841 (initialize_low): Adjust.
1842 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1844 2015-12-16 Pedro Alves <palves@redhat.com>
1846 * configure.ac (compiler warning flags): When testing a
1847 -Wno-foo option, check whether -Wfoo works instead.
1848 * configure: Regenerate.
1850 2015-12-11 Don Breazeal <donb@codesourcery.com>
1852 * server.c (process_serial_event): Don't exit from gdbserver
1853 in remote mode if there are still active inferiors.
1855 2015-12-11 Yao Qi <yao.qi@linaro.org>
1857 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1858 arm_breakpoint_at if the process is 32-bit.
1860 2015-12-11 Yao Qi <yao.qi@linaro.org>
1862 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1865 2015-12-07 Yao Qi <yao.qi@linaro.org>
1867 * configure.srv: Append arm.o to srv_tgtobj for
1868 aarch64*-*-linux* target.
1869 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1870 from linux-arm-low.c.
1871 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1872 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1873 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1874 (thumb2_breakpoint_len): Likewise.
1875 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1876 (arm_breakpoint_kinds): Likewise.
1877 (arm_breakpoint_kind_from_pc): Likewise.
1878 (arm_sw_breakpoint_from_kind): Likewise.
1879 (arm_breakpoint_kind_from_current_state): Likewise.
1880 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1881 (arm_sw_breakpoint_from_kind): Declare.
1882 (arm_breakpoint_kind_from_current_state): Declare.
1883 (arm_breakpoint_at): Declare.
1884 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1885 arm_sw_breakpoint_from_kind if process is 32-bit.
1886 (aarch64_breakpoint_kind_from_pc): New function.
1887 (aarch64_breakpoint_kind_from_current_state): New function.
1888 (the_low_target): Initialize fields breakpoint_kind_from_pc
1889 and breakpoint_kind_from_current_state.
1890 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1891 linux-aarch32-low.c.
1892 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1893 (arm_breakpoint, arm_breakpoint_len): Likewise.
1894 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1895 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1896 (arm_is_thumb_mode): Likewise.
1897 (arm_breakpoint_at): Likewise.
1898 (arm_breakpoint_kind_from_pc): Likewise.
1899 (arm_sw_breakpoint_from_kind): Likewise.
1900 (arm_breakpoint_kind_from_current_state): Likewise.
1903 2015-08-04 Yao Qi <yao.qi@linaro.org>
1905 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1906 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1907 * server.c (extended_protocol): Remove "static".
1908 * server.h (extended_protocol): Declare it.
1910 2015-12-04 Josh Stone <jistone@redhat.com>
1912 * target.h (struct target_ops) <arch_setup>: Rename to ...
1913 (struct target_ops) <post_create_inferior>: ... this.
1914 (target_arch_setup): Rename to ...
1915 (target_post_create_inferior): ... this, calling post_create_inferior.
1916 * server.c (start_inferior): Update target_arch_setup calls to
1917 target_post_create_inferior.
1918 * linux-low.c (linux_low_ptrace_options): Forward declare.
1919 (linux_arch_setup): Update its comment for general use.
1920 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1921 (struct linux_target_ops): Use linux_post_create_inferior.
1922 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1923 to post_create_inferior.
1924 * nto-low.c (struct nto_target_ops): Likewise.
1925 * spu-low.c (struct spu_target_ops): Likewise.
1926 * win32-low.c (struct win32_target_ops): Likewise.
1928 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1930 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1932 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1934 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1935 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1936 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1937 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1938 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1939 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1940 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1941 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1942 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1943 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1944 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1945 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1947 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1949 * linux-low.c (linux_look_up_symbols): Don't call
1950 linux_supports_traceclone.
1951 * linux-low.h (thread_db_init): Remove use_events argument.
1952 * thread-db.c (thread_db_use_event): Remove global variable.
1953 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1954 (struct thread_db) <td_create_bp>: Remove field.
1955 (thread_db_create_event): Remove function.
1956 (thread_db_enable_reporting): Likewise.
1957 (find_one_thread): Don't check for thread_db_use_events.
1958 (attach_thread): Likewise.
1959 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1960 (try_thread_db_load_1): Don't check for thread_db_use_events.
1961 (thread_db_init): Remove use_events argument and thread events
1963 (remove_thread_event_breakpoints): Remove function.
1964 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1966 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1968 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1970 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1971 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1973 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1974 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1976 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1978 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1979 * linux-low.c (can_hardware_single_step): Use
1980 supports_hardware_single_step.
1981 (can_software_single_step): New function.
1982 (start_step_over): Call can_software_single_step.
1983 (linux_supports_hardware_single_step): New function.
1984 (struct target_ops) <supports_software_single_step>: Initialize.
1985 * linux-low.h (struct linux_target_ops)
1986 <supports_hardware_single_step>: Initialize.
1987 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1988 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1989 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1990 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1991 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1993 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1994 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1995 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1996 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1998 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1999 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2001 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2002 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2003 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2006 * target.h (struct target_ops): <supports_software_single_step>:
2008 (target_supports_software_single_step): New macro.
2010 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2012 * linux-low.c (linux_wait_1): Fix pc advance condition.
2013 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2014 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2016 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2018 * linux-arm-low.c (arm_is_thumb_mode): New function.
2019 (arm_breakpoint_at): Use arm_is_thumb_mode.
2020 (arm_breakpoint_kind_from_current_state): New function.
2021 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2023 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2024 (linux_breakpoint_kind_from_current_state): New function.
2025 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2026 * linux-low.h (struct linux_target_ops)
2027 <breakpoint_kind_from_current_state>: New field.
2028 * target.h (struct target_ops): Likewise.
2029 (target_breakpoint_kind_from_current_state): New macro.
2031 2015-11-30 Pedro Alves <palves@redhat.com>
2033 * linux-low.c (linux_resume): Wake up the event loop before
2036 2015-11-30 Pedro Alves <palves@redhat.com>
2038 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2040 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2042 * target.c (struct thread_search): New structure.
2043 (thread_search_callback): New function.
2044 (prev_general_thread): New global.
2045 (prepare_to_access_memory, done_accessing_memory): New functions.
2046 * target.h (prepare_to_access_memory, done_accessing_memory):
2047 Replace macros with function declarations.
2049 2015-11-30 Pedro Alves <palves@redhat.com>
2052 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2053 report TARGET_WAITKIND_NO_RESUMED.
2054 * remote-utils.c (prepare_resume_reply): Handle
2055 TARGET_WAITKIND_NO_RESUMED.
2056 * server.c (report_no_resumed): New global.
2057 (handle_query) <qSupported>: Handle "no-resumed+". Report
2058 "no-resumed+" support.
2059 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2060 return error if the client doesn't support no-resumed events.
2061 (push_stop_notification): New function.
2062 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2063 events if the client supports them.
2065 2015-11-30 Pedro Alves <palves@redhat.com>
2067 * linux-low.c (thread_still_has_status_pending_p): Don't check
2069 (lwp_resumed): New function.
2070 (status_pending_p_callback): Return early if the LWP is not
2071 supposed to be resumed.
2073 2015-11-30 Pedro Alves <palves@redhat.com>
2075 * linux-low.c (handle_extended_wait): Assert that the LWP's
2076 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2077 thread create events, leave the new child's status pending.
2078 (linux_low_filter_event): If GDB wants to hear about thread exit
2079 events, leave the LWP marked dead and don't delete it.
2080 (linux_wait_for_event_filtered): Don't check for thread exit.
2081 (filter_exit_event): New function.
2082 (linux_wait_1): Use it, when returning an exit event.
2083 (linux_resume_one_lwp_throw): Assert that the LWP's
2084 waitstatus is TARGET_WAITKIND_IGNORE.
2085 * remote-utils.c (prepare_resume_reply): Handle
2086 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2087 * server.c (report_thread_events): New global.
2088 (handle_general_set): Handle QThreadEvents.
2089 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2090 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2091 TARGET_WAITKIND_THREAD_EXITED.
2092 * server.h (report_thread_events): Declare.
2094 2015-11-30 Pedro Alves <palves@redhat.com>
2096 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2097 the thread's last_resume_kind was resume_stop.
2099 2015-11-30 Pedro Alves <palves@redhat.com>
2101 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2104 2015-11-30 Pedro Alves <palves@redhat.com>
2106 * server.c (handle_v_requests): Handle vCtrlC.
2108 2015-11-30 Pedro Alves <palves@redhat.com>
2110 * gdbthread.h (find_any_thread_of_pid): Declare.
2111 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2113 * server.c (handle_query): If current_thread is NULL, look for
2114 another thread of the selected process.
2116 2015-11-26 Daniel Colascione <dancol@dancol.org>
2117 Simon Marchi <simon.marchi@ericsson.com>
2119 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2120 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2122 * target.h (struct target_ops) <thread_name>: New field.
2123 (target_thread_name): New macro.
2125 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2127 * regcache.h (regcache_invalidate_pid): Add declaration.
2128 * regcache.c (regcache_invalidate_pid): New function, extracted
2129 from regcache_invalidate.
2130 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2131 Add trivial documentation comment.
2132 * lynx-low.c: Use regcache_invalidate_pid instead of
2133 regcache_invalidate.
2135 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2137 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2138 and Elf64_auxv_t if the target is Android.
2140 2015-11-22 Doug Evans <xdje42@gmail.com>
2142 * target.h: #include <sys/types.h>.
2144 2015-11-19 Pedro Alves <palves@redhat.com>
2146 * linux-low.c (linux_process_qsupported): Change prototype.
2148 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2150 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2151 and adjust to loop over all features.
2152 * server.c (handle_query) <qSupported>: Adjust to call
2153 target_process_qsupported once, passing it a vector of unprocessed
2155 * target.h (struct target_ops) <process_qsupported>: Change
2157 (target_process_qsupported): Adjust.
2159 2015-11-19 Pedro Alves <palves@redhat.com>
2161 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2163 * configure: Regenerate.
2165 2015-11-19 Pedro Alves <palves@redhat.com>
2167 * configure: Regenerate.
2169 2015-11-19 Yao Qi <yao.qi@linaro.org>
2171 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2174 2015-11-19 Yao Qi <yao.qi@linaro.org>
2176 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2177 (struct aarch64_operand): Move enum out.
2179 2015-11-19 Yao Qi <yao.qi@linaro.org>
2181 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2182 struct user_fpsimd_state *.
2183 (aarch64_store_fpregset): Likewise.
2185 2015-11-19 Yao Qi <yao.qi@linaro.org>
2187 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2188 struct user_pt_regs *.
2189 (aarch64_store_gregset): Likewise.
2191 2015-11-18 Pedro Alves <palves@redhat.com>
2193 * Makefile.in (all_object_files): Add $IPA_OBJS.
2195 2015-11-17 Pedro Alves <palves@redhat.com>
2197 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2198 GDB_SIGNAL_0 and gdb_signal_to_string.
2200 2015-11-17 Pedro Alves <palves@redhat.com>
2202 * win32-low.c (handle_output_debug_string): Remove parameter.
2203 (win32_kill): Remove our_status local and adjust call to
2204 handle_output_debug_string.
2205 (get_child_debug_event): Adjust call to
2206 handle_output_debug_string.
2208 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2210 * linux-mips-low.c (mips_fill_gregset): Add cast.
2211 (mips_store_gregset): Likewise.
2212 (mips_fill_fpregset): Likewise.
2213 (mips_store_fpregset): Likewise.
2215 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2217 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2220 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2222 * linux-mips-low.c (mips_linux_new_thread): Change type of
2223 watch_type to enum target_hw_bp_type.
2225 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2227 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2228 Change return type to arm_hwbp_type.
2230 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2232 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2233 (arm_store_gregset): Likewise.
2234 * linux-arm-low.c (arm_get_hwcap): Likewise.
2235 (arm_read_description): Likewise.
2237 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2239 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2241 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2243 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2244 (ppc_fill_vsxregset): Likewise.
2245 (ppc_store_vsxregset): Likewise.
2246 (ppc_fill_vrregset): Likewise.
2247 (ppc_store_vrregset): Likewise.
2248 (ppc_fill_evrregset): Likewise.
2249 (ppc_store_evrregset): Likewise.
2251 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2253 * linux-ppc-low.c (ppc_usrregs_info): Remove
2254 forward-declaration.
2255 (ppc_arch_setup): Move lower in file.
2257 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2259 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2260 (ps_pdwrite): Likewise.
2262 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2264 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2265 to after assert checks.
2267 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2269 * proc-service.c (ps_pdread): Add/adjust casts.
2270 (ps_pdwrite): Add/adjust casts.
2272 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2274 * server.c (handle_search_memory_1): Cast return value of
2277 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2279 * server.c (write_qxfer_response): Change type of data to
2282 2015-10-29 Pedro Alves <palves@redhat.com>
2284 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2286 2015-10-29 Pedro Alves <palves@redhat.com>
2288 * tracepoint.c (clear_installed_tracepoints): Add casts.
2290 2015-10-29 Pedro Alves <palves@redhat.com>
2292 * server.c (handle_v_cont, process_serial_event): Add enum
2293 gdb_signal casts to signal parsing code.
2295 2015-10-29 Pedro Alves <palves@redhat.com>
2297 * linux-low.h (NULL_REGSET): Define.
2298 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2299 * linux-arm-low.c (arm_regsets): Likewise.
2300 * linux-crisv32-low.c (cris_regsets): Likewise.
2301 * linux-m68k-low.c (m68k_regsets): Likewise.
2302 * linux-mips-low.c (mips_regsets): Likewise.
2303 * linux-nios2-low.c (nios2_regsets): Likewise.
2304 * linux-ppc-low.c (ppc_regsets): Likewise.
2305 * linux-s390-low.c (s390_regsets): Likewise.
2306 * linux-sh-low.c (sh_regsets): Likewise.
2307 * linux-sparc-low.c (sparc_regsets): Likewise.
2308 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2309 * linux-tile-low.c (tile_regsets): Likewise.
2310 * linux-x86-low.c (x86_regsets): Likewise.
2311 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2313 2015-10-29 Pedro Alves <palves@redhat.com>
2315 * linux-low.h (NULL_REGSET): Define.
2316 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2317 * linux-arm-low.c (arm_regsets): Likewise.
2318 * linux-crisv32-low.c (cris_regsets): Likewise.
2319 * linux-m68k-low.c (m68k_regsets): Likewise.
2320 * linux-mips-low.c (mips_regsets): Likewise.
2321 * linux-nios2-low.c (nios2_regsets): Likewise.
2322 * linux-ppc-low.c (ppc_regsets): Likewise.
2323 * linux-s390-low.c (s390_regsets): Likewise.
2324 * linux-sh-low.c (sh_regsets): Likewise.
2325 * linux-sparc-low.c (sparc_regsets): Likewise.
2326 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2327 * linux-tile-low.c (tile_regsets): Likewise.
2328 * linux-x86-low.c (x86_regsets): Likewise.
2329 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2331 2015-10-26 Doug Evans <dje@google.com>
2333 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2335 2015-10-26 Doug Evans <dje@google.com>
2337 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2339 2015-10-26 Doug Evans <dje@google.com>
2341 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2343 (attach_thread, find_new_threads_callback): Ditto.
2345 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2347 * mem-break.h (set_breakpoint_data): Remove.
2349 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2351 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2353 (initialize_low): Remove set_breakpoint_data call.
2354 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2355 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2356 (initialize_low): Remove set_breakpoint_data call.
2357 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2358 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2359 (initialize_low): Remove set_breakpoint_data call.
2361 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2363 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2364 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2365 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2366 * target.h (target_breakpoint_kind_from_pc): New macro.
2368 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2370 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2371 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2372 the default breakpoint kind.
2374 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2376 * linux-arm-low.c (arm_supports_z_point_type): Add software
2379 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2381 * linux-arm-low.c: Refactor breakpoint definitions.
2382 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2383 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2385 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2387 * Makefile.in: Add arm.c/o.
2388 * configure.srv: Likewise.
2389 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2390 (arm_breakpoint_kind_from_pc): New function.
2391 (arm_sw_breakpoint_from_kind): Return proper kind.
2392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2394 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2396 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2398 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2399 (struct raw_breakpoint) <size>: Remove.
2400 (struct raw_breakpoint) <kind>: Add.
2401 (bp_size): New function.
2402 (bp_opcode): Likewise.
2403 (find_raw_breakpoint_at): Adjust for kind.
2404 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2405 (remove_memory_breakpoint): Adjust for kind call bp_size.
2406 (set_raw_breakpoint_at): Adjust for kind.
2407 (set_breakpoint): Likewise.
2408 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2409 (delete_raw_breakpoint): Adjust for kind.
2410 (delete_breakpoint): Likewise.
2411 (find_gdb_breakpoint): Likewise.
2412 (set_gdb_breakpoint_1): Likewise.
2413 (set_gdb_breakpoint): Likewise.
2414 (delete_gdb_breakpoint_1): Likewise.
2415 (delete_gdb_breakpoint): Likewise.
2416 (uninsert_raw_breakpoint): Likewise.
2417 (reinsert_raw_breakpoint): Likewise.
2418 (set_breakpoint_data): Remove.
2419 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2420 (check_mem_read): Adjust for kind call bp_size.
2421 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2422 (clone_one_breakpoint): Adjust for kind.
2423 * mem-break.h (set_gdb_breakpoint): Likewise.
2424 (delete_gdb_breakpoint): Likewise.
2425 * server.c (process_serial_event): Likewise.
2427 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2429 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2430 (struct linux_target_ops) <breakpoint>: Remove.
2431 (struct linux_target_ops) <breakpoint_len>: Remove.
2432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2434 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2435 (arm_sw_breakpoint_from_kind): New function.
2436 * linux-bfin-low.c (bfin_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-cris-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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2447 (struct linux_target_ops) <breakpoint>: Remove.
2448 (struct linux_target_ops) <breakpoint_len>: Remove.
2449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2451 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2452 and sw_breakpoint_from_kind to increment the pc.
2453 (linux_breakpoint_kind_from_pc): New function.
2454 (linux_sw_breakpoint_from_kind): New function.
2455 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2456 (initialize_low): Call breakpoint_kind_from_pc and
2457 sw_breakpoint_from_kind to replace breakpoint_data/len.
2458 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2461 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2502 (struct linux_target_ops) <breakpoint>: Remove.
2503 (struct linux_target_ops) <breakpoint_len>: Remove.
2504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2506 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2507 * linux-x86-low.c (x86_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.
2512 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2513 (struct linux_target_ops) <breakpoint>: Remove.
2514 (struct linux_target_ops) <breakpoint_len>: Remove.
2515 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2516 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2518 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2520 * linux-cris-low.c (cris_get_pc): Remove void arg.
2522 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2524 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2527 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2529 * inferiors.c (thread_pid_matches_callback): New function.
2530 (find_thread_process): New function.
2531 (remove_thread): Reset current_thread.
2532 (remove_process): Assert threads have been removed first.
2534 2015-10-15 Yao Qi <yao.qi@linaro.org>
2536 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2538 (aarch64_remove_point): Likewise.
2539 * regcache.c (regcache_register_size): New function.
2541 2015-10-12 Yao Qi <yao.qi@linaro.org>
2543 * linux-aarch64-low.c: Update all callers as emit_load_store
2544 is renamed to aarch64_emit_load_store.
2546 2015-10-12 Yao Qi <yao.qi@linaro.org>
2548 * linux-aarch64-low.c: Update all callers of function renaming
2549 from emit_insn to aarch64_emit_insn.
2551 2015-10-12 Yao Qi <yao.qi@linaro.org>
2553 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2554 arch/aarch64-insn.h.
2555 (struct aarch64_memory_operand): Likewise.
2557 (emit_insn): Move to arch/aarch64-insn.c.
2558 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2559 (emit_load_store): Move to arch/aarch64-insn.c.
2560 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2561 (can_encode_int32): Remove.
2563 2015-10-12 Yao Qi <yao.qi@linaro.org>
2565 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2566 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2567 (aarch64_relocate_instruction): Likewise.
2568 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2569 (struct aarch64_insn_visitor): Likewise.
2571 2015-10-12 Yao Qi <yao.qi@linaro.org>
2573 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2574 (struct aarch64_insn_visitor): New.
2575 (struct aarch64_insn_relocation_data): New.
2576 (aarch64_ftrace_insn_reloc_b): New function.
2577 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2578 (aarch64_ftrace_insn_reloc_cb): Likewise.
2579 (aarch64_ftrace_insn_reloc_tb): Likewise.
2580 (aarch64_ftrace_insn_reloc_adr): Likewise.
2581 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2582 (aarch64_ftrace_insn_reloc_others): Likewise.
2584 (aarch64_relocate_instruction): Use visitor.
2586 2015-10-12 Yao Qi <yao.qi@linaro.org>
2588 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2589 int. Add argument buf.
2590 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2591 aarch64_relocate_instruction.
2593 2015-10-12 Yao Qi <yao.qi@linaro.org>
2595 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2596 argument insn. Remove local variable insn. Don't call
2598 (aarch64_install_fast_tracepoint_jump_pad): Call
2601 2015-09-30 Yao Qi <yao.qi@linaro.org>
2603 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2604 (emit_load_store_pair): Likewise.
2606 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2608 * dll.c (match_dll): Add cast(s).
2609 (unloaded_dll): Likewise.
2610 * linux-low.c (second_thread_of_pid_p): Likewise.
2611 (delete_lwp_callback): Likewise.
2612 (count_events_callback): Likewise.
2613 (select_event_lwp_callback): Likewise.
2614 (linux_set_resume_request): Likewise.
2615 * server.c (accumulate_file_name_length): Likewise.
2616 (emit_dll_description): Likewise.
2617 (handle_qxfer_threads_worker): Likewise.
2618 (visit_actioned_threads): Likewise.
2619 * thread-db.c (any_thread_of): Likewise.
2620 * tracepoint.c (same_process_p): Likewise.
2621 (match_blocktype): Likewise.
2622 (build_traceframe_info_xml): Likewise.
2624 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2626 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2628 (gdb_unparse_agent_expr): Likewise.
2629 * hostio.c (require_data): Likewise.
2630 (handle_pread): Likewise.
2631 * linux-low.c (disable_regset): Likewise.
2632 (fetch_register): Likewise.
2633 (store_register): Likewise.
2634 (get_dynamic): Likewise.
2635 (linux_qxfer_libraries_svr4): Likewise.
2636 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2637 (set_fast_tracepoint_jump): Likewise.
2638 (uninsert_fast_tracepoint_jumps_at): Likewise.
2639 (reinsert_fast_tracepoint_jumps_at): Likewise.
2640 (validate_inserted_breakpoint): Likewise.
2641 (clone_agent_expr): Likewise.
2642 * regcache.c (init_register_cache): Likewise.
2643 * remote-utils.c (putpkt_binary_1): Likewise.
2644 (decode_M_packet): Likewise.
2645 (decode_X_packet): Likewise.
2646 (look_up_one_symbol): Likewise.
2647 (relocate_instruction): Likewise.
2648 (monitor_output): Likewise.
2649 * server.c (handle_search_memory): Likewise.
2650 (handle_qxfer_exec_file): Likewise.
2651 (handle_qxfer_libraries): Likewise.
2652 (handle_qxfer): Likewise.
2653 (handle_query): Likewise.
2654 (handle_v_cont): Likewise.
2655 (handle_v_run): Likewise.
2656 (captured_main): Likewise.
2657 * target.c (write_inferior_memory): Likewise.
2658 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2659 * tracepoint.c (init_trace_buffer): Likewise.
2660 (add_tracepoint_action): Likewise.
2661 (add_traceframe): Likewise.
2662 (add_traceframe_block): Likewise.
2663 (cmd_qtdpsrc): Likewise.
2664 (cmd_qtdv): Likewise.
2665 (cmd_qtstatus): Likewise.
2666 (response_source): Likewise.
2667 (response_tsv): Likewise.
2668 (cmd_qtnotes): Likewise.
2669 (gdb_collect): Likewise.
2670 (initialize_tracepoint): Likewise.
2672 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2674 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2675 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2676 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2678 (enum aarch64_condition_codes): New enum.
2679 (w0): New static global.
2682 (struct aarch64_memory_operand) <type>: New
2683 MEMORY_OPERAND_POSTINDEX type.
2684 (postindex_memory_operand): New helper function.
2685 (emit_ret): New function.
2686 (emit_load_store_pair): New function, factored out of emit_stp
2687 with support for MEMORY_OPERAND_POSTINDEX.
2688 (emit_stp): Rewrite using emit_load_store_pair.
2689 (emit_ldp): New function.
2690 (emit_load_store): Likewise.
2691 (emit_ldr): Mention post-index instruction in comment.
2692 (emit_ldrh): New function.
2693 (emit_ldrb): New function.
2694 (emit_ldrsw): Mention post-index instruction in comment.
2695 (emit_str): Likewise.
2696 (emit_subs): New function.
2697 (emit_cmp): Likewise.
2698 (emit_and): Likewise.
2699 (emit_orr): Likewise.
2700 (emit_orn): Likewise.
2701 (emit_eor): Likewise.
2702 (emit_mvn): Likewise.
2703 (emit_lslv): Likewise.
2704 (emit_lsrv): Likewise.
2705 (emit_asrv): Likewise.
2706 (emit_mul): Likewise.
2707 (emit_sbfm): Likewise.
2708 (emit_sbfx): Likewise.
2709 (emit_ubfm): Likewise.
2710 (emit_ubfx): Likewise.
2711 (emit_csinc): Likewise.
2712 (emit_cset): Likewise.
2713 (emit_nop): Likewise.
2714 (emit_ops_insns): New helper function.
2715 (emit_pop): Likewise.
2716 (emit_push): Likewise.
2717 (aarch64_emit_prologue): New function.
2718 (aarch64_emit_epilogue): Likewise.
2719 (aarch64_emit_add): Likewise.
2720 (aarch64_emit_sub): Likewise.
2721 (aarch64_emit_mul): Likewise.
2722 (aarch64_emit_lsh): Likewise.
2723 (aarch64_emit_rsh_signed): Likewise.
2724 (aarch64_emit_rsh_unsigned): Likewise.
2725 (aarch64_emit_ext): Likewise.
2726 (aarch64_emit_log_not): Likewise.
2727 (aarch64_emit_bit_and): Likewise.
2728 (aarch64_emit_bit_or): Likewise.
2729 (aarch64_emit_bit_xor): Likewise.
2730 (aarch64_emit_bit_not): Likewise.
2731 (aarch64_emit_equal): Likewise.
2732 (aarch64_emit_less_signed): Likewise.
2733 (aarch64_emit_less_unsigned): Likewise.
2734 (aarch64_emit_ref): Likewise.
2735 (aarch64_emit_if_goto): Likewise.
2736 (aarch64_emit_goto): Likewise.
2737 (aarch64_write_goto_address): Likewise.
2738 (aarch64_emit_const): Likewise.
2739 (aarch64_emit_call): Likewise.
2740 (aarch64_emit_reg): Likewise.
2741 (aarch64_emit_pop): Likewise.
2742 (aarch64_emit_stack_flush): Likewise.
2743 (aarch64_emit_zero_ext): Likewise.
2744 (aarch64_emit_swap): Likewise.
2745 (aarch64_emit_stack_adjust): Likewise.
2746 (aarch64_emit_int_call_1): Likewise.
2747 (aarch64_emit_void_call_2): Likewise.
2748 (aarch64_emit_eq_goto): Likewise.
2749 (aarch64_emit_ne_goto): Likewise.
2750 (aarch64_emit_lt_goto): Likewise.
2751 (aarch64_emit_le_goto): Likewise.
2752 (aarch64_emit_gt_goto): Likewise.
2753 (aarch64_emit_ge_got): Likewise.
2754 (aarch64_emit_ops_impl): New static global variable.
2755 (aarch64_emit_ops): New target function, return
2756 &aarch64_emit_ops_impl.
2757 (struct linux_target_ops): Install it.
2759 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2761 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2762 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2764 * linux-aarch64-ipa.c: New file.
2765 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2767 (aarch64_get_thread_area): New target method.
2768 (extract_signed_bitfield): New helper function.
2769 (aarch64_decode_ldr_literal): New function.
2770 (enum aarch64_opcodes): New enum.
2771 (struct aarch64_register): New struct.
2772 (struct aarch64_operand): New struct.
2773 (x0): New static global.
2782 (aarch64_register): New helper function.
2783 (register_operand): Likewise.
2784 (immediate_operand): Likewise.
2785 (struct aarch64_memory_operand): New struct.
2786 (offset_memory_operand): New helper function.
2787 (preindex_memory_operand): Likewise.
2788 (enum aarch64_system_control_registers): New enum.
2789 (ENCODE): New macro.
2790 (emit_insn): New helper function.
2791 (emit_b): New function.
2792 (emit_bcond): Likewise.
2793 (emit_cb): Likewise.
2794 (emit_tb): Likewise.
2795 (emit_blr): Likewise.
2796 (emit_stp): Likewise.
2797 (emit_ldp_q_offset): Likewise.
2798 (emit_stp_q_offset): Likewise.
2799 (emit_load_store): Likewise.
2800 (emit_ldr): Likewise.
2801 (emit_ldrsw): Likewise.
2802 (emit_str): Likewise.
2803 (emit_ldaxr): Likewise.
2804 (emit_stxr): Likewise.
2805 (emit_stlr): Likewise.
2806 (emit_data_processing_reg): Likewise.
2807 (emit_data_processing): Likewise.
2808 (emit_add): Likewise.
2809 (emit_sub): Likewise.
2810 (emit_mov): Likewise.
2811 (emit_movk): Likewise.
2812 (emit_mov_addr): Likewise.
2813 (emit_mrs): Likewise.
2814 (emit_msr): Likewise.
2815 (emit_sevl): Likewise.
2816 (emit_wfe): Likewise.
2817 (append_insns): Likewise.
2818 (can_encode_int32_in): New helper function.
2819 (aarch64_relocate_instruction): New function.
2820 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2821 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2822 (struct linux_target_ops): Install aarch64_get_thread_area,
2823 aarch64_install_fast_tracepoint_jump_pad and
2824 aarch64_get_min_fast_tracepoint_insn_len.
2826 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2828 * Makefile.in (aarch64-insn.o): New rule.
2829 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2831 2015-09-21 Yao Qi <yao.qi@linaro.org>
2833 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2835 2015-09-21 Yao Qi <yao.qi@linaro.org>
2837 * tracepoint.c (max_jump_pad_size): Remove.
2839 2015-09-18 Yao Qi <yao.qi@linaro.org>
2841 * linux-aarch64-low.c: Don't include sys/uio.h.
2842 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2844 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2846 * tracepoint.c (eval_result_type): Change prototype.
2847 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2849 2015-09-15 Pedro Alves <palves@redhat.com>
2851 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2852 Check whether to report exec events instead of checking whether
2853 multiprocess is enabled.
2855 2015-09-15 Pedro Alves <palves@redhat.com>
2858 * remote-utils.c (prepare_resume_reply): Merge
2859 TARGET_WAITKIND_VFORK_DONE switch case with the
2860 TARGET_WAITKIND_FORKED case.
2862 2015-09-15 Yao Qi <yao.qi@linaro.org>
2864 * server.c (handle_query): Check string comparison using
2865 "else if" instead of "if".
2867 2015-09-15 Yao Qi <yao.qi@linaro.org>
2869 * server.c (vCont_supported): New global variable.
2870 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2871 matches. Append ";vContSupported+" to own_buf.
2872 (handle_v_requests): Append ";s;S" to own_buf if target supports
2873 hardware single step or vCont_supported is false.
2874 (capture_main): Set vCont_supported to zero.
2876 2015-09-15 Yao Qi <yao.qi@linaro.org>
2878 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2880 (linux_supports_hardware_single_step): ... New function.
2881 (linux_target_ops): Update.
2882 * lynx-low.c (lynx_target_ops): Set field
2883 supports_hardware_single_step to target_can_do_hardware_single_step.
2884 * nto-low.c (nto_target_ops): Likewise.
2885 * spu-low.c (spu_target_ops): Likewise.
2886 * win32-low.c (win32_target_ops): Likewise.
2887 * target.c (target_can_do_hardware_single_step): New function.
2888 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2889 Remove. <supports_hardware_single_step>: New field.
2890 (target_supports_conditional_breakpoints): Remove.
2891 (target_supports_hardware_single_step): New macro.
2892 (target_can_do_hardware_single_step): Declare.
2893 * server.c (handle_query): Use target_supports_hardware_single_step
2894 instead of target_supports_conditional_breakpoints.
2896 2015-09-15 Yao Qi <yao.qi@linaro.org>
2898 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2900 (struct linux_target_ops the_low_target): Install
2901 aarch64_linux_siginfo_fixup.
2903 2015-09-11 Don Breazeal <donb@codesourcery.com>
2904 Luis Machado <lgustavo@codesourcery.com>
2906 * linux-low.c (linux_mourn): Static declaration.
2907 (linux_arch_setup): Move in front of
2908 handle_extended_wait.
2909 (linux_arch_setup_thread): New function.
2910 (handle_extended_wait): Handle exec events. Call
2911 linux_arch_setup_thread. Make event_lwp argument a
2912 pointer-to-a-pointer.
2913 (check_zombie_leaders): Do not check stopped threads.
2914 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2915 (linux_low_filter_event): Add lwp and thread for exec'ing
2916 non-leader thread if leader thread has been deleted.
2917 Refactor code into linux_arch_setup_thread and call it.
2918 Pass child lwp pointer by reference to handle_extended_wait.
2919 (linux_wait_for_event_filtered): Update comment.
2920 (linux_wait_1): Prevent clobbering exec event status.
2921 (linux_supports_exec_events): New function.
2922 (linux_target_ops) <supports_exec_events>: Initialize new member.
2923 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2925 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2926 * server.c (report_exec_events): New global variable.
2927 (handle_query): Handle qSupported query for exec-events feature.
2928 (captured_main): Initialize report_exec_events.
2929 * server.h (report_exec_events): Declare new global variable.
2930 * target.h (struct target_ops) <supports_exec_events>: New
2932 (target_supports_exec_events): New macro.
2933 * win32-low.c (win32_target_ops) <supports_exec_events>:
2934 Initialize new member.
2936 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2938 * linux-low.c (linux_low_enable_btrace): Remove.
2939 (linux_target_ops): Replace linux_low_enable_btrace with
2940 linux_enable_btrace.
2942 2015-09-03 Yao Qi <yao.qi@linaro.org>
2944 * linux-aarch64-low.c (aarch64_insert_point): Call
2945 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2948 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2950 * linux-low.c (check_stopped_by_breakpoint): Use
2951 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2953 2015-08-27 Pedro Alves <palves@redhat.com>
2955 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2957 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2959 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2960 the XNEW-family equivalent.
2961 (compile_bytecodes): Likewise.
2962 * dll.c (loaded_dll): Likewise.
2963 * event-loop.c (append_callback_event): Likewise.
2964 (create_file_handler): Likewise.
2965 (create_file_event): Likewise.
2966 * hostio.c (handle_open): Likewise.
2967 * inferiors.c (add_thread): Likewise.
2968 (add_process): Likewise.
2969 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2970 * linux-arm-low.c (arm_new_process): Likewise.
2971 (arm_new_thread): Likewise.
2972 * linux-low.c (add_to_pid_list): Likewise.
2973 (linux_add_process): Likewise.
2974 (handle_extended_wait): Likewise.
2975 (add_lwp): Likewise.
2976 (enqueue_one_deferred_signal): Likewise.
2977 (enqueue_pending_signal): Likewise.
2978 (linux_resume_one_lwp_throw): Likewise.
2979 (linux_resume_one_thread): Likewise.
2980 (linux_read_memory): Likewise.
2981 (linux_write_memory): Likewise.
2982 * linux-mips-low.c (mips_linux_new_process): Likewise.
2983 (mips_linux_new_thread): Likewise.
2984 (mips_add_watchpoint): Likewise.
2985 * linux-x86-low.c (initialize_low_arch): Likewise.
2986 * lynx-low.c (lynx_add_process): Likewise.
2987 * mem-break.c (set_raw_breakpoint_at): Likewise.
2988 (set_breakpoint): Likewise.
2989 (add_condition_to_breakpoint): Likewise.
2990 (add_commands_to_breakpoint): Likewise.
2991 (clone_agent_expr): Likewise.
2992 (clone_one_breakpoint): Likewise.
2993 * regcache.c (new_register_cache): Likewise.
2994 * remote-utils.c (look_up_one_symbol): Likewise.
2995 * server.c (queue_stop_reply): Likewise.
2996 (start_inferior): Likewise.
2997 (queue_stop_reply_callback): Likewise.
2998 (handle_target_event): Likewise.
2999 * spu-low.c (fetch_ppc_memory): Likewise.
3000 (store_ppc_memory): Likewise.
3001 * target.c (set_target_ops): Likewise.
3002 * thread-db.c (thread_db_load_search): Likewise.
3003 (try_thread_db_load_1): Likewise.
3004 * tracepoint.c (add_tracepoint): Likewise.
3005 (add_tracepoint_action): Likewise.
3006 (create_trace_state_variable): Likewise.
3007 (cmd_qtdpsrc): Likewise.
3008 (cmd_qtro): Likewise.
3009 (add_while_stepping_state): Likewise.
3010 * win32-low.c (child_add_thread): Likewise.
3011 (get_image_name): Likewise.
3013 2015-08-25 Yao Qi <yao.qi@linaro.org>
3015 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3017 2015-08-25 Yao Qi <yao.qi@linaro.org>
3019 * Makefile.in (aarch64-linux.o): New rule.
3020 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3022 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3023 (aarch64_init_debug_reg_state): Make it extern.
3024 (aarch64_linux_prepare_to_resume): Remove.
3026 2015-08-25 Yao Qi <yao.qi@linaro.org>
3028 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3029 lwp_arch_private_info and ptid_of_lwp.
3031 2015-08-25 Yao Qi <yao.qi@linaro.org>
3033 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3034 Find proc_info by find_process_pid. All callers updated.
3036 2015-08-25 Yao Qi <yao.qi@linaro.org>
3038 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3040 (debug_reg_change_callback): Remove.
3041 (aarch64_notify_debug_reg_change): Remove.
3043 2015-08-25 Yao Qi <yao.qi@linaro.org>
3045 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3046 Call current_lwp_ptid.
3048 2015-08-25 Yao Qi <yao.qi@linaro.org>
3050 * linux-aarch64-low.c (debug_reg_change_callback): Use
3053 2015-08-25 Yao Qi <yao.qi@linaro.org>
3055 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3057 2015-08-25 Yao Qi <yao.qi@linaro.org>
3059 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3061 2015-08-25 Yao Qi <yao.qi@linaro.org>
3063 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3066 2015-08-25 Yao Qi <yao.qi@linaro.org>
3068 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3070 (debug_reg_change_callback): Remove argument entry and add argument
3071 lwp. Remove local variable thread. Don't print thread id in the
3072 debugging output. Don't check whether pid of thread equals to pid.
3073 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3074 iterate_over_lwps instead find_inferior.
3076 2015-08-24 Pedro Alves <palves@redhat.com>
3078 * inferiors.c (get_first_process): New function.
3079 * inferiors.h (get_first_process): New declaration.
3080 * remote-utils.c (read_ptid): Default to the first process in the
3081 list, instead of to the current thread's process.
3083 2015-08-24 Pedro Alves <palves@redhat.com>
3085 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3086 * event-loop.c: Likewise.
3087 * remote-utils.c: Likewise.
3088 * tracepoint.c: Likewise.
3090 2015-08-24 Pedro Alves <palves@redhat.com>
3092 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3095 2015-08-21 Pedro Alves <palves@redhat.com>
3097 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3098 instead of literal 1.
3100 2015-08-21 Pedro Alves <palves@redhat.com>
3102 * tdesc.c (default_description): Explicitly zero-initialize.
3104 2015-08-21 Pedro Alves <palves@redhat.com>
3107 * inferiors.c (remove_thread): Discard any pending stop reply for
3109 * server.c (remove_all_on_match_pid): Rename to ...
3110 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3112 (discard_queued_stop_replies): Change parameter to a ptid. Now
3114 (handle_v_kill, kill_inferior_callback, captured_main)
3115 (process_serial_event): Adjust.
3116 * server.h (discard_queued_stop_replies): Declare.
3118 2015-08-21 Pedro Alves <palves@redhat.com>
3120 * linux-low.c (wait_for_sigstop): Always switch to no thread
3121 selected if the previously current thread dies.
3122 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3123 process instead of the current thread's.
3124 * remote-utils.c (input_interrupt): Don't check if there's no
3126 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3127 current thread to the general thread fails, error out.
3128 (handle_qxfer_auxv, handle_qxfer_libraries)
3129 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3130 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3131 (handle_query): Check if there's a thread selected instead of
3132 checking whether there's any thread in the thread list.
3133 (handle_qxfer_threads, handle_qxfer_btrace)
3134 (handle_qxfer_btrace_conf): Don't error out early if there's no
3135 thread in the thread list.
3136 (handle_v_cont, myresume): Don't set the current thread to the
3138 (process_serial_event) <Hg handling>: Also set thread_id if the
3139 previous general thread is still alive.
3140 (process_serial_event) <g/G handling>: If setting the current
3141 thread to the general thread fails, error out.
3142 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3143 thread's lwp instead of the current thread's.
3144 * target.c (set_desired_thread): If the desired thread was not
3145 found, leave the current thread pointing to NULL. Return an int
3146 (boolean) indicating success.
3147 * target.h (set_desired_thread): Change return type to int.
3149 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3151 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3152 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3154 (ps_get_thread_area): New function.
3156 2015-08-19 Gary Benson <gbenson@redhat.com>
3158 * hostio.c (handle_pread): Do not attempt to read more data
3159 than hostio_reply_with_data can fit in a packet.
3161 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3163 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3165 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3167 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3169 2015-08-06 Pedro Alves <palves@redhat.com>
3171 * tracepoint.c (expr_eval_result): Now an int.
3173 2015-08-06 Pedro Alves <palves@redhat.com>
3175 * gdbthread.h (struct regcache): Forward declare.
3176 (struct thread_info) <regcache_data>: Now a struct regcache
3178 * inferiors.c (inferior_regcache_data)
3179 (set_inferior_regcache_data): Now work with struct regcache
3181 * inferiors.h (struct regcache): Forward declare.
3182 (inferior_regcache_data, set_inferior_regcache_data): Now work
3183 with struct regcache pointers.
3184 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3185 (free_register_cache_thread): Remove struct regcache pointer
3188 2015-08-06 Pedro Alves <palves@redhat.com>
3190 * server.c (captured_main): On error, print the exception message
3191 to stderr, and if run_once is set, throw a quit.
3193 2015-08-06 Pedro Alves <palves@redhat.com>
3195 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3198 2015-08-06 Pedro Alves <palves@redhat.com>
3200 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3201 reading beyond the passed in buffer length.
3203 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3205 * tracepoint.c (symbol_list) <required>: Remove.
3207 2015-08-06 Pedro Alves <palves@redhat.com>
3209 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3210 count if stopping and suspending threads.
3211 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3212 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3213 (linux_detach): Complete an ongoing step-over.
3214 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3216 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3217 (linux_wait_1): If passing a signal to the inferior after
3218 finishing a step-over, unsuspend and re-resume all lwps. If we
3219 see a single-step event but the thread should be continuing, don't
3220 pass the trap to gdb.
3221 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3222 internal_error instead of gdb_assert.
3223 (enqueue_pending_signal): New function.
3224 (check_ptrace_stopped_lwp_gone): Add debug output.
3225 (start_step_over): Use internal_error instead of gdb_assert.
3226 (complete_ongoing_step_over): New function.
3227 (linux_resume_one_thread): Don't resume a suspended thread.
3228 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3231 2015-08-06 Pedro Alves <palves@redhat.com>
3233 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3234 (linux_thread_alive): Use lwp_is_marked_dead.
3235 (extended_event_reported): Delete.
3236 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3237 instead of extended_event_reported.
3238 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3240 (lwp_is_marked_dead): New function.
3241 (lwp_running): Use lwp_is_marked_dead.
3242 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3245 2015-08-06 Pedro Alves <palves@redhat.com>
3247 * linux-low.c (linux_wait_1): Move fork event output out of the
3248 !report_to_gdb check. Pass event_child->waitstatus to
3249 target_waitstatus_to_string instead of ourstatus.
3251 2015-08-04 Yao Qi <yao.qi@linaro.org>
3253 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3254 if current_thread is 32 bit.
3256 2015-08-04 Yao Qi <yao.qi@linaro.org>
3258 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3259 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3260 * server.c (extended_protocol): Remove "static".
3261 * server.h (extended_protocol): Declare it.
3263 2015-08-04 Yao Qi <yao.qi@linaro.org>
3265 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3266 both aarch64 and aarch32.
3267 (aarch64_set_pc): Likewise.
3269 2015-08-04 Yao Qi <yao.qi@linaro.org>
3271 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3272 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3273 arm-with-neon.xml to srv_xmlfiles.
3274 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3275 (is_64bit_tdesc): New function.
3276 (aarch64_linux_read_description): New function.
3277 (aarch64_arch_setup): Call aarch64_linux_read_description.
3278 (regs_info): Rename to regs_info_aarch64.
3279 (aarch64_regs_info): Return right regs_info.
3280 (initialize_low_arch): Call initialize_low_arch_aarch32.
3282 2015-08-04 Yao Qi <yao.qi@linaro.org>
3284 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3285 * linux-aarch32-low.c: New file.
3286 * linux-aarch32-low.h: New file.
3287 * linux-arm-low.c (arm_fill_gregset): Move it to
3288 linux-aarch32-low.c.
3289 (arm_store_gregset): Likewise.
3290 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3291 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3292 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3293 (regs_info): Rename to regs_info_arm.
3294 (arm_regs_info): Return regs_info_aarch32 if
3295 have_ptrace_getregset is 1 and target description is
3296 arm_with_neon or arm_with_vfpv3.
3297 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3298 Call initialize_low_arch_aarch32 instead.
3300 2015-08-04 Yao Qi <yao.qi@linaro.org>
3302 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3303 * linux-low.c: ... here.
3304 * linux-low.h (have_ptrace_getregset): Declare it.
3306 2015-08-04 Pedro Alves <palves@redhat.com>
3308 * thread-db.c (struct thread_db): Use new typedefs.
3309 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3311 (disable_thread_event_reporting): Cast result of dlsym to
3312 destination function pointer type.
3313 (thread_db_mourn): Use td_ta_delete_ftype.
3315 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3317 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3319 (CDX_BREAKPOINT): Define for R2.
3320 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3321 (the_low_target): Add comments.
3323 2015-07-30 Yao Qi <yao.qi@linaro.org>
3325 * linux-arm-low.c (arm_hwcap): Remove it.
3326 (arm_read_description): New local variable arm_hwcap. Don't
3327 set arm_hwcap to zero.
3329 2015-07-30 Yao Qi <yao.qi@linaro.org>
3331 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3332 Use regcache->tdesc instead.
3333 (arm_store_wmmxregset): Likewise.
3334 (arm_fill_vfpregset): Likewise.
3335 (arm_store_vfpregset): Likewise.
3337 2015-07-30 Yao Qi <yao.qi@linaro.org>
3339 * linux-arm-low.c: Include arch/arm.h.
3340 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3341 (arm_store_gregset): Likewise.
3343 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3345 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3346 ptrace's 4th parameter.
3348 2015-07-27 Yao Qi <yao.qi@linaro.org>
3350 * configure.srv (case aarch64*-*-linux*): Don't set
3353 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3355 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3357 * linux-arm-low.c: Likewise.
3358 * linux-cris-low.c: Likewise.
3359 * linux-crisv32-low.c: Likewise.
3360 * linux-low.c: Likewise.
3361 * linux-m68k-low.c: Likewise.
3362 * linux-mips-low.c: Likewise.
3363 * linux-nios2-low.c: Likewise.
3364 * linux-s390-low.c: Likewise.
3365 * linux-sparc-low.c: Likewise.
3366 * linux-tic6x-low.c: Likewise.
3367 * linux-tile-low.c: Likewise.
3368 * linux-x86-low.c: Likewise.
3370 2015-07-24 Pedro Alves <palves@redhat.com>
3372 * config.in: Regenerate.
3373 * configure: Regenerate.
3375 2015-07-24 Pedro Alves <palves@redhat.com>
3377 * acinclude.m4: Include ../ptrace.m4.
3378 * configure.ac: Call GDB_AC_PTRACE.
3379 * config.in, configure: Regenerate.
3381 2015-07-24 Yao Qi <yao.qi@linaro.org>
3383 * linux-low.c (linux_create_inferior): Remove setting to
3384 proc->priv->new_inferior.
3385 (linux_attach): Likewise.
3386 (linux_low_filter_event): Likewise.
3387 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3389 2015-07-24 Yao Qi <yao.qi@linaro.org>
3391 * linux-low.c (linux_arch_setup): New function.
3392 (linux_low_filter_event): If proc->tdesc is NULL and
3393 proc->attached is true, call the_low_target.arch_setup.
3394 Otherwise, keep status pending, and return.
3395 (linux_resume_one_lwp_throw): Don't call get_pc if
3396 thread->while_stepping isn't NULL. Don't call
3397 get_thread_regcache if proc->tdesc is NULL.
3398 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3399 (linux_target_ops): Install arch_setup.
3400 * server.c (start_inferior): Call the_target->arch_setup.
3401 * target.h (struct target_ops) <arch_setup>: New field.
3402 (target_arch_setup): New marco.
3403 * lynx-low.c (lynx_target_ops): Update.
3404 * nto-low.c (nto_target_ops): Update.
3405 * spu-low.c (spu_target_ops): Update.
3406 * win32-low.c (win32_target_ops): Update.
3408 2015-07-24 Yao Qi <yao.qi@linaro.org>
3410 * linux-low.c (linux_add_process): Don't set
3411 proc->priv->new_inferior.
3412 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3413 (linux_attach): Likewise.
3415 2015-07-24 Yao Qi <yao.qi@linaro.org>
3417 * server.c (start_inferior): Code refactor.
3419 2015-07-24 Yao Qi <yao.qi@linaro.org>
3421 * server.c (process_serial_event): Set general_thread.
3423 2015-07-21 Yao Qi <yao.qi@linaro.org>
3425 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3426 aarch64_linux_get_debug_reg_capacity.
3428 2015-07-17 Yao Qi <yao.qi@linaro.org>
3430 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3431 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3432 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3433 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3434 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3435 (AARCH64_HWP_ALIGNMENT): Likewise.
3436 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3437 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3438 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3439 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3440 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3441 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3442 (struct aarch64_debug_reg_state): Likewise.
3443 (struct arch_lwp_info): Likewise.
3444 (aarch64_align_watchpoint): Likewise.
3445 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3446 (aarch64_watchpoint_length): Likewise.
3447 (aarch64_point_encode_ctrl_reg): Likewise
3448 (aarch64_point_is_aligned): Likewise.
3449 (aarch64_align_watchpoint): Likewise.
3450 (aarch64_linux_set_debug_regs):
3451 (aarch64_dr_state_insert_one_point): Likewise.
3452 (aarch64_dr_state_remove_one_point): Likewise.
3453 (aarch64_handle_breakpoint): Likewise.
3454 (aarch64_handle_aligned_watchpoint): Likewise.
3455 (aarch64_handle_unaligned_watchpoint): Likewise.
3456 (aarch64_handle_watchpoint): Likewise.
3458 2015-07-17 Yao Qi <yao.qi@linaro.org>
3460 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3461 and don't aarch64_get_debug_reg_state. All callers update.
3462 (aarch64_handle_aligned_watchpoint): Likewise.
3463 (aarch64_handle_unaligned_watchpoint): Likewise.
3464 (aarch64_handle_watchpoint): Likewise.
3465 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3466 (aarch64_remove_point): Likewise.
3468 2015-07-17 Yao Qi <yao.qi@linaro.org>
3470 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3472 (aarch64_handle_unaligned_watchpoint): Likewise.
3474 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3476 Revert the previous 3 commits:
3477 Move gdb_regex* to common/
3478 Move linux_find_memory_regions_full & co.
3479 gdbserver build-id attribute generator
3481 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3482 Jan Kratochvil <jan.kratochvil@redhat.com>
3484 gdbserver build-id attribute generator.
3485 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3486 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3487 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3489 (get_dynamic): Use find_pdhr to traverse program headers.
3490 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3491 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3492 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3493 (get_hex_build_id): New.
3494 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3495 to reply XML document.
3497 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3498 Jan Kratochvil <jan.kratochvil@redhat.com>
3500 * target.c: Include target/target-utils.h and fcntl.h.
3501 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3502 (target_fileio_read_stralloc): New functions.
3504 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3506 * Makefile.in (OBS): Add gdb_regex.o.
3508 * config.in: Rebuilt.
3509 * configure: Rebuilt.
3511 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3512 Jan Kratochvil <jan.kratochvil@redhat.com>
3514 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3515 * Makefile.in (OBS): Add target-utils.o.
3516 (linux-maps.o, target-utils.o): New.
3517 * configure.srv (srv_linux_obj): Add linux-maps.o.
3519 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3521 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3523 (the_low_target): Install it.
3525 2015-07-14 Pedro Alves <palves@redhat.com>
3527 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3528 Instead, ignore ECHILD, and throw an error for other errnos.
3530 2015-07-10 Pedro Alves <palves@redhat.com>
3532 * event-loop.c (struct callback_event) <data>: Change type to
3533 gdb_client_data instance instead of gdb_client_data pointer.
3534 (append_callback_event): Adjust.
3536 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3538 * linux-aarch64-low.c: Add comments for each linux_target_ops
3539 method. Remove comments already covered in target_ops and
3540 linux_target_ops definitions.
3541 (the_low_target): Add comments for each unimplemented method.
3543 2015-07-09 Yao Qi <yao.qi@linaro.org>
3545 * linux-aarch64-low.c (aarch64_regmap): Remove.
3546 (aarch64_usrregs_info): Remove.
3547 (regs_info): Set field usrregs to NULL.
3549 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3551 * linux-low.c: Include "rsp-low.h"
3552 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3553 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3554 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3555 (handle_btrace_enable_pt): New.
3556 (handle_btrace_general_set): Support "pt".
3557 (handle_btrace_conf_general_set): Support "pt:size".
3559 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3561 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3564 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3566 * linux-aarch64-low.c: Remove comment about endianness.
3567 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3568 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3571 2015-06-24 Gary Benson <gbenson@redhat.com>
3573 * linux-i386-ipa.c (stdint.h): Do not include.
3574 * lynx-i386-low.c (stdint.h): Likewise.
3575 * lynx-ppc-low.c (stdint.h): Likewise.
3576 * mem-break.c (stdint.h): Likewise.
3577 * thread-db.c (stdint.h): Likewise.
3578 * tracepoint.c (stdint.h): Likewise.
3579 * win32-low.c (stdint.h): Likewise.
3581 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3583 * server.c (write_qxfer_response): Update call to
3584 remote_escape_output.
3586 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3587 Jan Kratochvil <jan.kratochvil@redhat.com>
3589 Merge multiple hex conversions.
3590 * gdbreplay.c (tohex): Rename to 'fromhex'.
3591 (logchar): Use fromhex.
3593 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3595 * server.c (handle_qxfer_libraries): Set `version' attribute for
3598 2015-06-10 Gary Benson <gbenson@redhat.com>
3600 * target.h (struct target_ops) <multifs_open>: New field.
3601 <multifs_unlink>: Likewise.
3602 <multifs_readlink>: Likewise.
3603 * linux-low.c (nat/linux-namespaces.h): New include.
3604 (linux_target_ops): Initialize the_target->multifs_open,
3605 the_target->multifs_unlink and the_target->multifs_readlink.
3606 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3607 * hostio.c (hostio_fs_pid): New static variable.
3608 (hostio_handle_new_gdb_connection): New function.
3609 (handle_setfs): Likewise.
3610 (handle_open): Use the_target->multifs_open as appropriate.
3611 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3612 (handle_readlink): Use the_target->multifs_readlink as
3614 (handle_vFile): Handle vFile:setfs packets.
3615 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3616 after target_handle_new_gdb_connection.
3618 2015-06-10 Gary Benson <gbenson@redhat.com>
3620 * configure.ac (AC_CHECK_FUNCS): Add setns.
3621 * config.in: Regenerate.
3622 * configure: Likewise.
3623 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3624 (linux-namespaces.o): New rule.
3625 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3627 2015-06-09 Gary Benson <gbenson@redhat.com>
3629 * hostio.c (handle_open): Process mode argument with
3630 fileio_to_host_mode.
3632 2015-06-01 Yao Qi <yao.qi@linaro.org>
3634 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3635 * linux-x86-low.c: Likewise.
3637 2015-05-28 Don Breazeal <donb@codesourcery.com>
3639 * linux-low.c (handle_extended_wait): Initialize
3640 thread_info.last_resume_kind for new fork children.
3642 2015-05-15 Pedro Alves <palves@redhat.com>
3644 * target.h (target_handle_new_gdb_connection): Rewrite using if
3645 wrapped in do/while.
3647 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3649 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3650 * configure, config.in: Regenerate.
3651 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3654 2015-05-12 Don Breazeal <donb@codesourcery.com>
3656 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3657 PTRACE_EVENT_VFORK_DONE.
3658 (linux_low_ptrace_options, extended_event_reported): Add vfork
3660 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3661 and "vforkdone" for RSP 'T' Stop Reply Packet.
3662 * server.h (report_vfork_events): Declare
3665 2015-05-12 Don Breazeal <donb@codesourcery.com>
3667 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3668 (the_low_target) <new_fork>: Initialize new member.
3669 * linux-arm-low.c (arm_new_fork): New function.
3670 (the_low_target) <new_fork>: Initialize new member.
3671 * linux-low.c (handle_extended_wait): Call new target function
3673 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3674 * linux-mips-low.c (mips_add_watchpoint): New function
3675 extracted from mips_insert_point.
3676 (the_low_target) <new_fork>: Initialize new member.
3677 (mips_linux_new_fork): New function.
3678 (mips_insert_point): Call mips_add_watchpoint.
3679 * linux-x86-low.c (x86_linux_new_fork): New function.
3680 (the_low_target) <new_fork>: Initialize new member.
3682 2015-05-12 Don Breazeal <donb@codesourcery.com>
3684 * linux-low.c (handle_extended_wait): Implement return value,
3685 rename argument 'event_child' to 'event_lwp', handle
3686 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3687 (linux_low_ptrace_options): New function.
3688 (linux_low_filter_event): Call linux_low_ptrace_options,
3689 use different argument fo linux_enable_event_reporting,
3690 use return value from handle_extended_wait.
3691 (extended_event_reported): New function.
3692 (linux_wait_1): Call extended_event_reported and set
3693 status to report fork events.
3694 (linux_write_memory): Add pid to debug message.
3695 (reset_lwp_ptrace_options_callback): New function.
3696 (linux_handle_new_gdb_connection): New function.
3697 (linux_target_ops): Initialize new structure member.
3698 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3699 * lynx-low.c: Initialize new structure member.
3700 * remote-utils.c (prepare_resume_reply): Implement stop reason
3701 "fork" for "T" stop message.
3702 * server.c (handle_query): Call handle_new_gdb_connection.
3703 * server.h (report_fork_events): Declare global flag.
3704 * target.h (struct target_ops) <handle_new_gdb_connection>:
3706 (target_handle_new_gdb_connection): New macro.
3707 * win32-low.c: Initialize new structure member.
3709 2015-05-12 Don Breazeal <donb@codesourcery.com>
3711 * mem-break.c (APPEND_TO_LIST): Define macro.
3712 (clone_agent_expr): New function.
3713 (clone_one_breakpoint): New function.
3714 (clone_all_breakpoints): New function.
3715 * mem-break.h: Declare new functions.
3717 2015-05-12 Don Breazeal <donb@codesourcery.com>
3719 * linux-low.c (linux_supports_fork_events): New function.
3720 (linux_supports_vfork_events): New function.
3721 (linux_target_ops): Initialize new structure members.
3722 (initialize_low): Call linux_check_ptrace_features.
3723 * lynx-low.c (lynx_target_ops): Initialize new structure
3725 * server.c (report_fork_events, report_vfork_events):
3727 (handle_query): Add new features to qSupported packet and
3729 (captured_main): Initialize new global variables.
3730 * target.h (struct target_ops) <supports_fork_events>:
3732 <supports_vfork_events>: New member.
3733 (target_supports_fork_events): New macro.
3734 (target_supports_vfork_events): New macro.
3735 * win32-low.c (win32_target_ops): Initialize new structure
3738 2015-05-12 Gary Benson <gbenson@redhat.com>
3740 * server.c (handle_qxfer_exec_file): Use current process
3743 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3745 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3746 Remove HAVE_PTRACE_GETREGS conditionals.
3747 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3748 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3750 2015-05-08 Yao Qi <yao.qi@linaro.org>
3752 * linux-low.c (linux_supports_conditional_breakpoints): New
3754 (linux_target_ops): Install new target method.
3755 * lynx-low.c (lynx_target_ops): Install NULL hook for
3756 supports_conditional_breakpoints.
3757 * nto-low.c (nto_target_ops): Likewise.
3758 * spu-low.c (spu_target_ops): Likewise.
3759 * win32-low.c (win32_target_ops): Likewise.
3760 * server.c (handle_query): Check
3761 target_supports_conditional_breakpoints.
3762 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3764 (target_supports_conditional_breakpoints): New macro.
3766 2015-05-06 Pedro Alves <palves@redhat.com>
3769 * server.c (start_inferior): If the process exits, mourn it.
3771 2015-04-21 Gary Benson <gbenson@redhat.com>
3773 * hostio.c (fileio_open_flags_to_host): Factored out to
3774 fileio_to_host_openflags in common/fileio.c. Single use
3777 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3779 * linux-xtensa-low.c (xtensa_fill_gregset)
3780 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3783 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3785 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3786 (regs_info): Replace usrregs pointer with NULL.
3788 2015-04-17 Gary Benson <gbenson@redhat.com>
3790 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3791 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3792 * server.c (handle_qxfer_exec_file): New function.
3793 (qxfer_packets): Add exec-file entry.
3794 (handle_query): Report qXfer:exec-file:read as supported packet.
3796 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3798 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3800 2015-04-09 Gary Benson <gbenson@redhat.com>
3802 * hostio-errno.c (errno_to_fileio_error): Remove function.
3803 Update caller to use remote_fileio_to_fio_error.
3805 2015-04-09 Yao Qi <yao.qi@linaro.org>
3807 * linux-low.c (linux_insert_point): Call
3808 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3809 (linux_remove_point): Call remove_memory_breakpoint if type is
3811 * linux-x86-low.c (x86_insert_point): Don't call
3812 insert_memory_breakpoint.
3813 (x86_remove_point): Don't call remove_memory_breakpoint.
3815 2015-04-01 Pedro Alves <palves@redhat.com>
3816 Cleber Rosa <crosa@redhat.com>
3818 * server.c (gdbserver_usage): Reorganize and extend the usage
3821 2015-03-24 Pedro Alves <palves@redhat.com>
3823 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3824 output. Also dump TRAP_TRACE.
3825 (linux_low_filter_event): In debug output, distinguish a
3826 resume_stop SIGSTOP from a delayed SIGSTOP.
3828 2015-03-24 Gary Benson <gbenson@redhat.com>
3830 * linux-x86-low.c (x86_linux_new_thread): Moved to
3832 (x86_linux_prepare_to_resume): Likewise.
3834 2015-03-24 Gary Benson <gbenson@redhat.com>
3836 * Makefile.in (x86-linux-dregs.o): New rule.
3837 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3838 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3839 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3840 (x86_linux_dr_get): Likewise.
3841 (x86_linux_dr_set): Likewise.
3842 (update_debug_registers_callback): Likewise.
3843 (x86_linux_dr_set_addr): Likewise.
3844 (x86_linux_dr_get_addr): Likewise.
3845 (x86_linux_dr_set_control): Likewise.
3846 (x86_linux_dr_get_control): Likewise.
3847 (x86_linux_dr_get_status): Likewise.
3848 (x86_linux_update_debug_registers): Likewise.
3850 2015-03-24 Gary Benson <gbenson@redhat.com>
3852 * linux-x86-low.c (x86_linux_update_debug_registers):
3853 New function, factored out from...
3854 (x86_linux_prepare_to_resume): ...this.
3856 2015-03-24 Gary Benson <gbenson@redhat.com>
3858 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3859 (x86_linux_dr_set): Likewise.
3860 (update_debug_registers_callback): Likewise.
3861 (x86_linux_dr_set_addr): Likewise.
3862 (x86_linux_dr_get_addr): Likewise.
3863 (x86_linux_dr_set_control): Likewise.
3864 (x86_linux_dr_get_control): Likewise.
3865 (x86_linux_dr_get_status): Likewise.
3866 (x86_linux_prepare_to_resume): Likewise.
3868 2015-03-24 Gary Benson <gbenson@redhat.com>
3870 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3871 Use perror_with_name. Pass string through gettext.
3872 (x86_linux_dr_set): Likewise.
3874 2015-03-24 Gary Benson <gbenson@redhat.com>
3876 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3877 (x86_linux_dr_set_addr): ...this.
3878 (x86_dr_low_get_addr): Rename to...
3879 (x86_linux_dr_get_addr): ...this.
3880 (x86_dr_low_set_control): Rename to...
3881 (x86_linux_dr_set_control): ...this.
3882 (x86_dr_low_get_control): Rename to...
3883 (x86_linux_dr_get_control): ...this.
3884 (x86_dr_low_get_status): Rename to...
3885 (x86_linux_dr_get_status): ...this.
3886 (x86_dr_low): Update with new function names.
3888 2015-03-24 Gary Benson <gbenson@redhat.com>
3890 * Makefile.in (x86-linux.o): New rule.
3891 * configure.srv: Add x86-linux.o to relevant targets.
3892 * linux-low.c (lwp_set_arch_private_info): New function.
3893 (lwp_arch_private_info): Likewise.
3894 * linux-x86-low.c: Include nat/x86-linux.h.
3895 (arch_lwp_info): Removed structure.
3896 (update_debug_registers_callback):
3897 Use lwp_set_debug_registers_changed.
3898 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3899 and lwp_set_debug_registers_changed.
3900 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3902 2015-03-24 Gary Benson <gbenson@redhat.com>
3904 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3905 * linux-arm-low.c (arm_new_thread): Likewise.
3906 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3907 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3908 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3909 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3911 2015-03-24 Gary Benson <gbenson@redhat.com>
3913 * linux-low.c (ptid_of_lwp): New function.
3914 (lwp_is_stopped): Likewise.
3915 (lwp_stop_reason): Likewise.
3916 * linux-x86-low.c (update_debug_registers_callback):
3918 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3921 2015-03-24 Gary Benson <gbenson@redhat.com>
3923 * linux-low.h (linux_stop_lwp): Remove declaration.
3925 2015-03-24 Gary Benson <gbenson@redhat.com>
3927 * linux-low.h: Include nat/linux-nat.h.
3928 * linux-low.c (iterate_over_lwps_args): New structure.
3929 (iterate_over_lwps_filter): New function.
3930 (iterate_over_lwps): Likewise.
3931 * linux-x86-low.c (update_debug_registers_callback):
3932 Update signature to what iterate_over_lwps expects.
3933 Remove PID check that iterate_over_lwps now performs.
3934 (x86_dr_low_set_addr): Use iterate_over_lwps.
3935 (x86_dr_low_set_control): Likewise.
3937 2015-03-24 Gary Benson <gbenson@redhat.com>
3939 * linux-x86-low.c (x86_debug_reg_state): New function.
3940 (x86_linux_prepare_to_resume): Use the above.
3942 2015-03-24 Gary Benson <gbenson@redhat.com>
3944 * linux-low.c (current_lwp_ptid): New function.
3945 * linux-x86-low.c: Include nat/linux-nat.h.
3946 (x86_dr_low_get_addr): Use current_lwp_ptid.
3947 (x86_dr_low_get_control): Likewise.
3948 (x86_dr_low_get_status): Likewise.
3950 2015-03-20 Pedro Alves <palves@redhat.com>
3952 * tracepoint.c (cmd_qtstatus): Make "str" const.
3954 2015-03-20 Pedro Alves <palves@redhat.com>
3956 * server.c (handle_general_set): Make "req_str" const.
3958 2015-03-19 Pedro Alves <palves@redhat.com>
3960 * linux-low.c (linux_resume_one_lwp): Rename to ...
3961 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3962 instead call perror_with_name.
3963 (check_ptrace_stopped_lwp_gone): New function.
3964 (linux_resume_one_lwp): Reimplement as wrapper around
3965 linux_resume_one_lwp_throw that swallows errors if the LWP is
3968 2015-03-19 Pedro Alves <palves@redhat.com>
3970 * linux-low.c (count_events_callback, select_event_lwp_callback):
3971 No longer check whether the thread has resume_stop as last resume
3974 2015-03-19 Pedro Alves <palves@redhat.com>
3976 * linux-low.c (count_events_callback, select_event_lwp_callback):
3977 Use the lwp's status_pending_p field, not the thread's.
3979 2015-03-19 Pedro Alves <palves@redhat.com>
3981 * linux-low.c (select_event_lwp_callback): Update comments to
3982 no longer mention SIGTRAP.
3984 2015-03-18 Gary Benson <gbenson@redhat.com>
3986 * server.c (handle_query): Do not report vFile:fstat as supported.
3988 2015-03-11 Gary Benson <gbenson@redhat.com>
3990 * hostio.c (sys/types.h): New include.
3991 (sys/stat.h): Likewise.
3992 (common-remote-fileio.h): Likewise.
3993 (handle_fstat): New function.
3994 (handle_vFile): Handle vFile:fstat packets.
3996 2015-03-11 Gary Benson <gbenson@redhat.com>
3998 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3999 struct stat.st_blocks and struct stat.st_blksize.
4000 * configure: Regenerate.
4001 * config.in: Likewise.
4002 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4003 (OBS): Add common-remote-fileio.o.
4004 (common-remote-fileio.o): New rule.
4006 2015-03-09 Pedro Alves <palves@redhat.com>
4008 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4009 'struct sockaddr' pointer in 'accept' call.
4011 2015-03-09 Pedro Alves <palves@redhat.com>
4014 2015-03-07 Pedro Alves <palves@redhat.com>
4015 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4016 or <winsock2.h> here. Instead include "gdb_socket.h".
4017 (remote_open): Use union gdb_sockaddr_u.
4018 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4019 or <winsock2.h> here. Instead include "gdb_socket.h".
4020 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4021 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4023 (init_named_socket, gdb_agent_helper_thread): Use union
4026 2015-03-07 Pedro Alves <palves@redhat.com>
4028 * configure.ac (build_warnings): Move
4029 -Wdeclaration-after-statement to the C-specific set.
4030 * configure: Regenerate.
4032 2015-03-07 Pedro Alves <palves@redhat.com>
4034 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4035 or <winsock2.h> here. Instead include "gdb_socket.h".
4036 (remote_open): Use union gdb_sockaddr_u.
4037 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4038 or <winsock2.h> here. Instead include "gdb_socket.h".
4039 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4040 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4042 (init_named_socket, gdb_agent_helper_thread): Use union
4045 2015-03-07 Pedro Alves <palves@redhat.com>
4047 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4050 2015-03-06 Yao Qi <yao.qi@linaro.org>
4052 * linux-aarch64-low.c (aarch64_insert_point): Use
4053 show_debug_regs as a boolean.
4054 (aarch64_remove_point): Likewise.
4056 2015-03-05 Pedro Alves <palves@redhat.com>
4058 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4059 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4060 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4061 * nto-low.c (nto_target_ops): Likewise.
4062 * spu-low.c (spu_target_ops): Likewise.
4063 * win32-low.c (win32_target_ops): Likewise.
4065 2015-03-04 Pedro Alves <palves@redhat.com>
4067 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4068 Decide whether a breakpoint triggered based on the SIGTRAP's
4070 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4071 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4072 (linux_low_filter_event): Check for breakpoints before checking
4074 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4076 (linux_stopped_by_sw_breakpoint)
4077 (linux_supports_stopped_by_sw_breakpoint)
4078 (linux_stopped_by_hw_breakpoint)
4079 (linux_supports_stopped_by_hw_breakpoint): New functions.
4080 (linux_target_ops): Install new target methods.
4082 2015-03-04 Pedro Alves <palves@redhat.com>
4084 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4085 * server.c (swbreak_feature, hwbreak_feature): New globals.
4086 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4087 (captured_main): Clear swbreak_feature and hwbreak_feature.
4088 * server.h (swbreak_feature, hwbreak_feature): Declare.
4089 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4090 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4091 supports_stopped_by_hw_breakpoint>: New fields.
4092 (target_supports_stopped_by_sw_breakpoint)
4093 (target_stopped_by_sw_breakpoint)
4094 (target_supports_stopped_by_hw_breakpoint)
4095 (target_stopped_by_hw_breakpoint): Declare.
4097 2015-03-04 Pedro Alves <palves@redhat.com>
4099 enum lwp_stop_reason -> enum target_stop_reason
4100 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4101 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4102 (linux_wait_1, stuck_in_jump_pad_callback)
4103 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4104 (linux_stopped_by_watchpoint):
4105 * linux-low.h (enum lwp_stop_reason): Delete.
4106 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4107 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4109 2015-03-04 Yao Qi <yao.qi@linaro.org>
4111 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4113 2015-03-03 Gary Benson <gbenson@redhat.com>
4115 * hostio.c (handle_vFile): Fix prefix lengths.
4117 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4119 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4122 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4124 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4125 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4126 (clean): Add "rm -f" for above C files.
4127 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4128 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4129 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4130 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4131 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4132 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4133 (init_registers_s390x_vx_linux64)
4134 (init_registers_s390x_tevx_linux64)
4135 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4136 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4138 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4139 (s390_store_vxrs_high): New functions.
4140 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4142 (s390_arch_setup): Add logic for selecting one of the new target
4143 descriptions. Activate the new vector regsets if applicable.
4144 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4145 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4146 and init_registers_s390x_tevx_linux64.
4148 2015-03-01 Pedro Alves <palves@redhat.com>
4150 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4153 2015-02-27 Pedro Alves <palves@redhat.com>
4155 * linux-x86-low.c (u_debugreg_offset): New function.
4156 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4158 2015-02-27 Pedro Alves <palves@redhat.com>
4160 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4161 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4162 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4163 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4164 (ps_lsetfpregs, ps_getpid)
4165 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4166 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4167 (ps_lsetxregs, ps_plog): Declare.
4169 2015-02-27 Pedro Alves <palves@redhat.com>
4171 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4172 IP_AGENT_EXPORT_FUNC.
4173 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4174 IP_AGENT_EXPORT_FUNC.
4175 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4176 (IP_AGENT_EXPORT): Delete.
4177 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4178 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4179 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4180 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4181 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4182 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4183 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4184 (traceframe_read_count, traceframe_write_count)
4185 (traceframes_created, trace_state_variables, get_raw_reg)
4186 (get_trace_state_variable_value, set_trace_state_variable_value)
4187 (ust_loaded, helper_thread_id, cmd_buf): Use
4188 IPA_SYM_EXPORTED_NAME.
4189 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4190 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4191 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4192 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4193 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4194 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4195 EXTERN_C_PUSH/EXTERN_C_POP.
4196 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4197 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4198 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4199 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4200 (traceframe_write_count, traceframe_read_count)
4201 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4202 (about_to_request_buffer_space, get_trace_state_variable_value)
4203 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4204 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4205 EXTERN_C_PUSH/EXTERN_C_POP.
4206 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4207 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4208 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4209 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4210 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4211 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4212 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4213 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4215 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4216 (IP_AGENT_EXPORT_VAR_DECL): Define.
4218 (gdb_agent_get_raw_reg): Declare.
4220 2015-02-27 Tom Tromey <tromey@redhat.com>
4221 Pedro Alves <palves@redhat.com>
4223 Rename symbols whose names are reserved C++ keywords throughout.
4225 2015-02-27 Pedro Alves <palves@redhat.com>
4227 * Makefile.in (COMPILER): New, get it from autoconf.
4228 (CXX): Get from autoconf instead.
4229 (COMPILE.pre): Use COMPILER.
4230 (CC-LD): Rename to ...
4231 (CC_LD): ... this. Use COMPILER.
4232 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4233 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4234 * acinclude.m4: Include build-with-cxx.m4.
4235 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4236 Disable -Werror by default if building in C++ mode.
4237 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4238 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4239 the C++ compiler. Save/restore CXXFLAGS too.
4240 * configure: Regenerate.
4242 2015-02-27 Pedro Alves <palves@redhat.com>
4244 * acinclude.m4: Include libiberty.m4.
4245 * configure.ac: Call libiberty_INIT.
4246 * config.in, configure: Regenerate.
4248 2015-02-26 Pedro Alves <palves@redhat.com>
4250 * linux-low.c (linux_wait_1): When incrementing the PC past a
4251 program breakpoint always use the_low_target.breakpoint_len as
4252 increment, rather than the maximum between that and
4253 the_low_target.decr_pc_after_break.
4255 2015-02-23 Pedro Alves <palves@redhat.com>
4257 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4258 thread was doing a step-over; always adjust the PC if
4259 we stepped over a permanent breakpoint.
4260 (linux_wait_1): If we stepped over breakpoint that was on top of a
4261 permanent breakpoint, manually advance the PC past it.
4263 2015-02-23 Pedro Alves <palves@redhat.com>
4265 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4267 (x86_fill_gregset, x86_store_gregset): Use it when handling
4270 2015-02-20 Pedro Alves <palves@redhat.com>
4272 * thread-db.c: Include "nat/linux-procfs.h".
4273 (thread_db_init): Skip listing new threads if the kernel supports
4274 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4276 2015-02-20 Pedro Alves <palves@redhat.com>
4278 * linux-low.c (status_pending_p_callback): Use ptid_match.
4280 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4282 PR breakpoints/16812
4283 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4284 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4285 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4287 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4289 PR breakpoints/15956
4290 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4292 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4294 * linux-low.c (linux_low_btrace_conf): Print size.
4295 * server.c (handle_btrace_conf_general_set): New.
4296 (hanle_general_set): Call handle_btrace_conf_general_set.
4297 (handle_query): Report Qbtrace-conf:bts:size as supported.
4299 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4301 * linux-low.c (linux_low_enable_btrace): Update parameters.
4302 (linux_low_btrace_conf): New.
4303 (linux_target_ops)<to_btrace_conf>: Initialize.
4304 * server.c (current_btrace_conf): New.
4305 (handle_btrace_enable): Rename to ...
4306 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4307 to target_enable_btrace. Update comment. Update users.
4308 (handle_qxfer_btrace_conf): New.
4309 (qxfer_packets): Add btrace-conf entry.
4310 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4311 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4312 (target_ops)<read_btrace_conf>: New.
4313 (target_enable_btrace): Update parameters.
4314 (target_read_btrace_conf): New.
4316 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4318 * server.c (handle_btrace_general_set): Remove call to
4319 target_supports_btrace.
4320 (supported_btrace_packets): New.
4321 (handle_query): Call supported_btrace_packets.
4322 * target.h: include btrace-common.h.
4323 (btrace_target_info): Removed.
4324 (supports_btrace, target_supports_btrace): Update parameters.
4326 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4328 * Makefile.in (SFILES): Add common/btrace-common.c.
4329 (OBS): Add common/btrace-common.o.
4330 (btrace-common.o): Add build rules.
4331 * linux-low: Include btrace-common.h.
4332 (linux_low_read_btrace): Use struct btrace_data. Call
4333 btrace_data_init and btrace_data_fini.
4335 2015-02-06 Pedro Alves <palves@redhat.com>
4337 * thread-db.c (find_new_threads_callback): Add debug output.
4339 2015-02-04 Pedro Alves <palves@redhat.com>
4341 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4342 (resume_stopped_resumed_lwps): New function.
4343 (linux_wait_for_event_filtered): Use it.
4345 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4347 * Makefile.in (SFILES): Add linux-personality.c.
4348 (linux-personality.o): New rule.
4349 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4350 list of objects to be built.
4351 * linux-low.c: Include nat/linux-personality.h.
4352 (linux_create_inferior): Remove code to disable address space
4353 randomization (moved to ../nat/linux-personality.c). Create
4354 cleanup to disable address space randomization.
4356 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4358 * Makefile.in (posix-strerror.o): New rule.
4359 (mingw-strerror.o): Likewise.
4360 * configure: Regenerated.
4361 * configure.ac: Source file ../common/common.host. Initialize new
4362 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4364 2015-01-14 Yao Qi <yao@codesourcery.com>
4366 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4367 (ppc-linux.o): New rule.
4368 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4369 * configure.ac: AC_CHECK_FUNCS(getauxval).
4370 * config.in: Re-generated.
4371 * configure: Re-generated.
4372 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4373 ppc64_64bit_inferior_p
4375 2015-01-14 Yao Qi <yao@codesourcery.com>
4377 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4378 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4379 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4380 (PT_ORIG_R3, PT_TRAP): Likewise.
4381 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4382 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4383 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4385 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4387 * i387-fp.c (i387_cache_to_xsave): In look over
4388 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4389 zmmh_low_space field by use of zmmh_high_space.
4391 2015-01-09 Pedro Alves <palves@redhat.com>
4393 * linux-low.c (step_over_bkpt): Move higher up in the file.
4394 (handle_extended_wait): Don't store the stop_pc here.
4395 (get_stop_pc): Adjust comments and rename to ...
4396 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4397 stopped for a software breakpoint or hardware breakpoint.
4398 (thread_still_has_status_pending_p): New function.
4399 (status_pending_p_callback): Use
4400 thread_still_has_status_pending_p. If the event is no longer
4401 interesting, resume the LWP.
4402 (handle_tracepoints): Add assert.
4403 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4404 (wstatus_maybe_breakpoint): New function.
4405 (cancel_breakpoint): Delete function.
4406 (check_stopped_by_watchpoint): New function, factored out from
4407 linux_low_filter_event.
4408 (lp_status_maybe_breakpoint): Delete function.
4409 (linux_low_filter_event): Remove filter_ptid argument.
4410 Leave thread group exits pending here. Store the LWP's stop PC.
4411 Always leave events pending.
4412 (linux_wait_for_event_filtered): Pull all events out of the
4413 kernel, and leave them all pending.
4414 (count_events_callback, select_event_lwp_callback): Consider all
4416 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4417 (select_event_lwp): Only give preference to the stepping LWP in
4418 all-stop mode. Adjust comments.
4419 (ignore_event): New function.
4420 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4421 references to cancel_breakpoints. Adjust to renames. Also give
4422 equal priority to all LWPs that have had events in non-stop mode.
4423 If reporting a software breakpoint event, unadjust the LWP's PC.
4424 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4425 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4427 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4428 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4429 (linux_stopped_by_watchpoint): Adjust.
4430 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4431 * linux-low.h (enum lwp_stop_reason): New.
4432 (struct lwp_info) <stop_pc>: Adjust comment.
4433 <stopped_by_watchpoint>: Delete field.
4434 <stop_reason>: New field.
4435 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4436 * mem-break.c (software_breakpoint_inserted_here)
4437 (hardware_breakpoint_inserted_here): New function.
4438 * mem-break.h (software_breakpoint_inserted_here)
4439 (hardware_breakpoint_inserted_here): Declare.
4440 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4441 (cancel_breakpoints): Delete.
4442 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4443 (upload_fast_traceframes): Remove references to
4446 2015-01-09 Pedro Alves <palves@redhat.com>
4448 * thread-db.c (find_new_threads_callback): Ignore thread if the
4449 kernel thread ID is -1.
4451 2015-01-09 Pedro Alves <palves@redhat.com>
4453 * linux-low.c (linux_attach_fail_reason_string): Move to
4454 nat/linux-ptrace.c, and rename.
4455 (linux_attach_lwp): Update comment.
4456 (attach_proc_task_lwp_callback): New function.
4457 (linux_attach): Adjust to rename and use
4458 linux_proc_attach_tgid_threads.
4459 (linux_attach_fail_reason_string): Delete declaration.
4461 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4463 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4464 * server.c (gdbserver_version): Likewise.
4466 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4468 * remote-utils.c: Include ctype.h.
4469 (input_interrupt): Explicitly handle the case when the char
4470 received is the NUL byte. Improve the printing of non-ASCII
4473 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4475 * linux-low.c (linux_low_filter_event): Update call to
4476 linux_enable_event_reporting following the addition of
4477 a new parameter to that function.
4479 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4482 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4483 (AARCH64_FPCR_REGNO): Likewise.
4484 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4485 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4486 (aarch64_store_fpregset): Likewise.
4488 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4490 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4491 Remove FIXME comment about assumption about N.
4493 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4495 * configure.ac: If large-file support is disabled in GDBserver,
4496 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4497 * configure: Regenerate.
4499 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4501 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4502 warning upon ENODATA from ptrace.
4503 * linux-s390-low.c (s390_store_tdb): New.
4504 (s390_regsets): Add regset for NT_S390_TDB.
4506 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4508 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4509 without a fill_function.
4510 * linux-s390-low.c (s390_fill_last_break): Remove.
4511 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4512 (s390_arch_setup): Use regset's size instead of fill_function for
4515 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4517 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4518 the regset's store function when ptrace returned an error.
4519 * regcache.c (get_thread_regcache): Invalidate register cache
4520 before fetching inferior's registers.
4522 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4524 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4525 while-loop as for-loop.
4526 (regsets_store_inferior_registers): Likewise.
4528 2014-11-28 Yao Qi <yao@codesourcery.com>
4530 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4531 * config.in, configure: Re-generate.
4532 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4535 2014-11-21 Yao Qi <yao@codesourcery.com>
4537 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4538 (AC_CHECK_HEADERS): Remove malloc.h.
4539 * configure: Re-generated.
4540 * config.in: Re-generated.
4541 * server.h: Don't include alloca.h and malloc.h.
4542 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4543 Don't include malloc.h.
4545 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4547 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4548 corresponding ERRNO check in same block.
4550 2014-11-12 Pedro Alves <palves@redhat.com>
4552 * server.c (cont_thread): Update comment.
4553 (start_inferior, attach_inferior): No longer clear cont_thread.
4554 (handle_v_cont): No longer set cont_thread.
4555 (captured_main): Clear cont_thread each time a GDB connects.
4557 2014-11-12 Pedro Alves <palves@redhat.com>
4559 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4560 thread, and don't resume all threads if the Hc thread has exited.
4562 2014-11-12 Pedro Alves <palves@redhat.com>
4564 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4565 the process group instead of to a specific LWP.
4567 2014-10-15 Pedro Alves <palves@redhat.com>
4570 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4572 (arm_set_thread_context): Delete.
4573 (the_low_target): Adjust.
4574 * win32-i386-low.c (debug_registers_changed)
4575 (debug_registers_used): Delete.
4576 (update_debug_registers_callback): New function.
4577 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4578 needing to update their debug registers.
4579 (win32_get_current_dr): New function.
4580 (x86_dr_low_get_addr, x86_dr_low_get_control)
4581 (x86_dr_low_get_status): Fetch the debug register from the thread
4583 (i386_initial_stuff): Adjust.
4584 (i386_get_thread_context): Remove current_event parameter. Don't
4585 clear debug_registers_changed nor copy DR values to
4587 (i386_set_thread_context): Delete.
4588 (i386_prepare_to_resume): New function.
4589 (i386_thread_added): Mark the thread as needing to update irs
4591 (the_low_target): Remove i386_set_thread_context and install
4592 i386_prepare_to_resume.
4593 * win32-low.c (win32_get_thread_context): Adjust.
4594 (win32_set_thread_context): Use SetThreadContext
4596 (win32_prepare_to_resume): New function.
4597 (win32_require_context): New function, factored out from ...
4598 (thread_rec): ... this.
4599 (continue_one_thread): Call win32_prepare_to_resume on each thread
4600 we're about to continue.
4601 (win32_resume): Call win32_prepare_to_resume on the event thread.
4602 * win32-low.h (struct win32_thread_info)
4603 <debug_registers_changed>: New field.
4604 (struct win32_target_ops): Change prototype of set_thread_context,
4605 delete set_thread_context and add prepare_to_resume.
4606 (win32_require_context): New declaration.
4608 2014-10-08 Gary Benson <gbenson@redhat.com>
4610 * server.h: Do not include common-exceptions.h.
4612 2014-10-08 Gary Benson <gbenson@redhat.com>
4614 * server.h: Do not include cleanups.h.
4616 2014-09-30 James Hogan <james.hogan@imgtec.com>
4618 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4621 2014-09-23 Yao Qi <yao@codesourcery.com>
4623 * linux-low.c (lp_status_maybe_breakpoint): New function.
4624 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4625 (count_events_callback): Likewise.
4626 (select_event_lwp_callback): Likewise.
4627 (cancel_breakpoints_callback): Likewise.
4629 2014-09-19 Don Breazeal <donb@codesourcery.com>
4631 * linux-low.c (handle_extended_wait): Call
4632 linux_ptrace_get_extended_event.
4633 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4634 linux_is_extended_waitstatus.
4636 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4638 * Makefile.in (CPPFLAGS): Define.
4639 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4640 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4642 2014-09-16 Gary Benson <gbenson@redhat.com>
4644 * inferiors.h (current_inferior): Renamed as...
4645 (current_thread): New variable. All uses updated.
4646 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4647 (maybe_move_out_of_jump_pad): Likewise.
4648 (cancel_breakpoint): Likewise.
4649 (linux_low_filter_event): Likewise.
4650 (wait_for_sigstop): Likewise.
4651 (linux_resume_one_lwp): Likewise.
4652 (need_step_over_p): Likewise.
4653 (start_step_over): Likewise.
4654 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4655 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4656 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4657 and save_inferior as saved_thread.
4658 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4660 (regcache_invalidate_thread): Likewise.
4661 * remote-utils.c (prepare_resume_reply): Likewise.
4662 * thread-db.c (thread_db_get_tls_address): Likewise.
4663 (disable_thread_event_reporting): Likewise.
4664 (remove_thread_event_breakpoints): Likewise.
4665 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4667 * target.h (set_desired_inferior): Renamed as...
4668 (set_desired_thread): New declaration. All uses updated.
4669 * server.c (myresume): Updated comment to reference thread instead
4671 (handle_serial_event): Likewise.
4672 (handle_target_event): Likewise.
4674 2014-09-12 Tom Tromey <tromey@redhat.com>
4675 Gary Benson <gbenson@redhat.com>
4677 * regcache.h: Include common-regcache.h.
4678 (regcache_read_pc): Don't declare.
4679 * regcache.c (get_thread_regcache_for_ptid): New function.
4681 2014-09-11 Tom Tromey <tromey@redhat.com>
4682 Gary Benson <gbenson@redhat.com>
4684 * symbol.c: New file.
4685 * Makefile.in (SFILES): Add symbol.c.
4686 (OBS): Add symbol.o.
4688 2014-09-11 Gary Benson <gbenson@redhat.com>
4690 * target.c (target_stop_ptid, target_continue_ptid): New
4693 2014-09-11 Tom Tromey <tromey@redhat.com>
4694 Gary Benson <gbenson@redhat.com>
4696 * target.h: Include target/target.h.
4697 * target.c (target_read_memory, target_read_uint32)
4698 (target_write_memory): New functions.
4700 2014-09-11 Gary Benson <gbenson@redhat.com>
4702 * server.h (debug_hw_points): Don't declare.
4703 * server.c (debug_hw_points): Don't define. Replace all uses
4704 with show_debug_regs.
4705 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4706 all uses with show_debug_regs.
4708 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4710 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4711 endianness into account.
4712 (ppc_supply_ptrace_register): Likewise.
4714 2014-09-03 James Hogan <james.hogan@imgtec.com>
4716 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4717 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4719 2014-09-03 Gary Benson <gbenson@redhat.com>
4721 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4722 ALL_DEBUG_ADDRESS_REGISTERS.
4724 2014-09-02 Gary Benson <gbenson@redhat.com>
4726 * i386-low.h: Renamed as...
4727 * x86-low.h: New file. All type, function and variable name
4728 prefixes changed from "i386_" to "x86_". All references updated.
4729 * i386-low.c: Renamed as...
4730 * x86-low.c: New file. All type, function and variable name
4731 prefixes changed from "i386_" to "x86_". All references updated.
4733 2014-09-02 Gary Benson <gbenson@redhat.com>
4735 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4736 (x86_linux_new_thread): Likewise.
4738 2014-08-29 Gary Benson <gbenson@redhat.com>
4740 * server.h (setjmp.h): Do not include.
4741 (toplevel): Do not declare.
4742 (common-exceptions.h): Include.
4743 (cleanups.h): Likewise.
4744 * server.c (toplevel): Do not define.
4745 (exit_code): New static global.
4746 (detach_or_kill_for_exit_cleanup): New function.
4747 (main): New function. Original main renamed to...
4748 (captured_main): New function.
4749 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4751 2014-08-29 Gary Benson <gbenson@redhat.com>
4753 * Makefile.in (SFILES): Add common/common-exceptions.c.
4754 (OBS): Add common-exceptions.o.
4755 (common-exceptions.o): New rule.
4756 * utils.c (prepare_to_throw_exception): New function.
4758 2014-08-29 Gary Benson <gbenson@redhat.com>
4760 * config.in: Regenerate.
4761 * configure: Likewise.
4763 2014-08-29 Gary Benson <gbenson@redhat.com>
4765 * Makefile.in (SFILES): Add common/cleanups.c.
4767 (cleanups.o): New rule.
4769 2014-08-29 Gary Benson <gbenson@redhat.com>
4771 * utils.c (internal_vwarning): New function.
4773 2014-08-28 Gary Benson <gbenson@redhat.com>
4775 * utils.h (fatal): Remove declaration.
4776 * utils.c (fatal): Remove function.
4778 2014-08-28 Gary Benson <gbenson@redhat.com>
4780 * tracepoint.c (gdb_agent_init): Replace fatal with
4782 (initialize_tracepoint): Likewise.
4784 2014-08-28 Gary Benson <gbenson@redhat.com>
4786 * remote-utils.c (remote_prepare): Replace fatal with error.
4788 2014-08-28 Gary Benson <gbenson@redhat.com>
4790 * linux-low.c (linux_async): Replace fatal with warning.
4792 (linux_start_non_stop): Return -1 if linux_async failed.
4794 2014-08-28 Gary Benson <gbenson@redhat.com>
4796 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4798 (i386_dr_low_get_addr): Remove vague comment.
4799 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4802 2014-08-28 Gary Benson <gbenson@redhat.com>
4804 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4805 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4807 (linux_resume_one_lwp): Likewise.
4808 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4810 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4811 with internal_error.
4812 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4813 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4814 (find_register_by_name): Replace fatal with internal_error.
4815 (find_regno): Likewise.
4816 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4817 * thread-db.c (thread_db_create_event): Likewise.
4818 (thread_db_load_search): Likewise.
4819 (try_thread_db_load_1): Likewise.
4820 * tracepoint.c (get_jump_space_head): Replace fatal with
4822 (claim_trampoline_space): Likewise.
4823 (have_fast_tracepoint_trampoline_buffer): Likewise.
4824 (cmd_qtstart): Likewise.
4825 (stop_tracing): Likewise.
4826 (fast_tracepoint_collecting): Likewise.
4827 (target_malloc): Likewise.
4828 (download_tracepoint): Likewise.
4829 (download_trace_state_variables): Replace check with gdb_assert.
4830 (upload_fast_traceframes): Replace fatal with internal_error.
4832 2014-08-19 Tom Tromey <tromey@redhat.com>
4833 Gary Benson <gbenson@redhat.com>
4835 * Makefile.in (SFILES): Add common/common-debug.c.
4836 (OBS): Add common-debug.o.
4837 (common-debug.o): New rule.
4838 * debug.h (debug_printf): Don't declare.
4839 * debug.c (debug_printf): Renamed and rewritten as...
4840 (debug_vprintf): New function.
4842 2014-08-19 Gary Benson <gbenson@redhat.com>
4844 * utils.h: Do not include print-utils.h.
4846 2014-08-19 Tom Tromey <tromey@redhat.com>
4847 Gary Benson <gbenson@redhat.com>
4849 * server.h: Add static assertion.
4850 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4852 2014-08-19 Tom Tromey <tromey@redhat.com>
4853 Gary Benson <gbenson@redhat.com>
4855 * Makefile.in (SFILES): Add common/errors.c.
4856 (OBS): Add errors.o.
4857 (IPA_OBS): Add errors-ipa.o.
4858 (errors.o): New rule.
4859 (errors-ipa.o): Likewise.
4860 * utils.h (perror_with_name, error, warning): Don't declare.
4861 * utils.c (warning): Renamed and rewritten as...
4862 (vwarning): New function.
4863 (error): Renamed and rewritten as...
4864 (verror): New function.
4865 (internal_error): Renamed and rewritten as...
4866 (internal_verror): New function.
4868 2014-08-07 Gary Benson <gbenson@redhat.com>
4870 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4871 * configure: Regenerate.
4872 * config.in: Likewise.
4873 * server.h: Do not include errno.h.
4874 * event-loop.c: Likewise.
4875 * hostio-errno.c: Likewise.
4876 * linux-low.c: Likewise.
4877 * remote-utils.c: Likewise.
4878 * spu-low.c: Likewise.
4879 * utils.c: Likewise.
4880 * gdbreplay.c: Unconditionally include errno.h.
4882 2014-08-07 Gary Benson <gbenson@redhat.com>
4884 * server.h: Do not include string.h.
4885 * event-loop.c: Likewise.
4886 * linux-low.c: Likewise.
4887 * regcache.c: Likewise.
4888 * remote-utils.c: Likewise.
4889 * spu-low.c: Likewise.
4890 * utils.c: Likewise.
4892 2014-08-07 Gary Benson <gbenson@redhat.com>
4894 * server.h: Do not include gdb_assert.h.
4896 2014-08-07 Gary Benson <gbenson@redhat.com>
4898 * server.h: Do not include common-utils.h.
4900 2014-08-07 Gary Benson <gbenson@redhat.com>
4902 * server.h: Do not include ptid.h.
4903 * notif.h: Likewise.
4905 2014-08-07 Gary Benson <gbenson@redhat.com>
4907 * server.h: Do not include gdb_locale.h.
4909 2014-08-07 Gary Benson <gbenson@redhat.com>
4911 * server.h: Do not include gdb/signals.h.
4912 * win32-low.c: Likewise.
4914 2014-08-07 Gary Benson <gbenson@redhat.com>
4916 * server.h: Do not include pathmax.h.
4918 2014-08-07 Gary Benson <gbenson@redhat.com>
4920 * server.h: Do not include libiberty.h.
4921 * linux-bfin-low.c: Likewise.
4923 2014-08-07 Gary Benson <gbenson@redhat.com>
4925 * server.h: Do not include ansidecl.h.
4927 2014-08-07 Gary Benson <gbenson@redhat.com>
4929 * linux-x86-low.c: Do not include stddef.h.
4930 * lynx-ppc-low.c: Likewise.
4931 * tracepoint.c: Likewise.
4933 2014-08-07 Gary Benson <gbenson@redhat.com>
4935 * server.h: Do not include stdarg.h.
4936 * nto-low.c: Likewise.
4938 2014-08-07 Gary Benson <gbenson@redhat.com>
4940 * server.h: Do not include stdlib.h.
4941 * inferiors.c: Likewise.
4942 * linux-low.c: Likewise.
4943 * regcache.c: Likewise.
4944 * spu-low.c: Likewise.
4945 * tracepoint.c: Likewise.
4946 * utils.c: Likewise.
4948 2014-08-07 Gary Benson <gbenson@redhat.com>
4950 * server.h: Do not include stdio.h.
4951 * linux-low.c: Likewise.
4952 * remote-utils.c: Likewise.
4953 * spu-low.c: Likewise.
4954 * utils.c: Likewise.
4955 * wincecompat.c: Likewise.
4957 2014-08-06 Gary Benson <gbenson@redhat.com>
4959 * regcache.c (init_register_cache): Move conditionals inside if.
4961 2014-08-06 Gary Benson <gbenson@redhat.com>
4963 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4965 2014-07-31 Gary Benson <gbenson@redhat.com>
4967 * ax.h: Do not include server.h.
4968 * gdbthread.h: Likewise.
4969 * lynx-low.h: Likewise.
4970 * notif.h: Likewise.
4972 2014-07-30 Gary Benson <gbenson@redhat.com>
4974 * server.h: Include common-defs.h.
4975 Do not include config.h or build-gnulib-gdbserver/config.h.
4977 2014-07-30 Gary Benson <gbenson@redhat.com>
4979 * hostio-errno.c: Move server.h to top of includes list.
4980 * inferiors.c: Likewise.
4981 * linux-x86-low.c: Likewise.
4982 * notif.c: Include server.h.
4984 2014-07-24 Tom Tromey <tromey@redhat.com>
4985 Gary Benson <gbenson@redhat.com>
4987 * server.h (CORE_ADDR): Now unsigned.
4989 2014-07-16 Pedro Alves <palves@redhat.com>
4991 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4993 2014-07-15 Pedro Alves <palves@redhat.com>
4995 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4998 2014-07-11 Pedro Alves <palves@redhat.com>
5000 * linux-low.c (kill_wait_lwp): New function, based on
5001 kill_one_lwp_callback, but use my_waitpid directly.
5002 (kill_one_lwp_callback, linux_kill): Use it.
5004 2014-06-23 Pedro Alves <palves@redhat.com>
5006 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5007 before setting DR0..DR3.
5009 2014-06-20 Gary Benson <gbenson@redhat.com>
5011 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5012 * configure: Regenerated.
5013 * config.in: Likewise.
5015 2014-06-20 Gary Benson <gbenson@redhat.com>
5017 * Makefile.in (SFILES): Update locations for files moved
5019 (object file files): Reordered.
5021 2014-06-20 Gary Benson <gbenson@redhat.com>
5023 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5024 (i386_dr_low_set_addr): Likewise.
5025 (i386_dr_low_get_addr): Likewise.
5026 (i386_dr_low_can_set_control): Likewise.
5027 (i386_dr_low_set_control): Likewise.
5028 (i386_dr_low_get_control): Likewise.
5029 (i386_dr_low_get_status): Likewise.
5030 (i386_get_debug_register_length): Likewise.
5031 * linux-x86-low.c (i386_dr_low_set_addr):
5032 Changed signature. Made static.
5033 (i386_dr_low_get_addr): Likewise.
5034 (i386_dr_low_set_control): Likewise.
5035 (i386_dr_low_get_control): Likewise.
5036 (i386_dr_low_get_status): Likewise.
5037 (i386_dr_low): New global variable.
5038 * win32-i386-low.c (i386_dr_low_set_addr):
5039 Changed signature. Made static.
5040 (i386_dr_low_get_addr): Likewise.
5041 (i386_dr_low_set_control): Likewise.
5042 (i386_dr_low_get_control): Likewise.
5043 (i386_dr_low_get_status): Likewise.
5044 (i386_dr_low): New global variable.
5046 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5048 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5049 * Makefile.in (AR, AR_FLAGS): Define.
5050 * configure: Regenerate.
5052 2014-06-19 Gary Benson <gbenson@redhat.com>
5054 * Makefile.in (i386-dregs.o): New rule.
5055 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5056 * i386-low.c (target.h): Remove include.
5057 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5058 (DR_CONTROL_SHIFT): Likewise.
5059 (DR_CONTROL_SIZE): Likewise.
5060 (DR_RW_EXECUTE): Likewise.
5061 (DR_RW_WRITE): Likewise.
5062 (DR_RW_READ): Likewise.
5063 (DR_RW_IORW): Likewise.
5064 (DR_LEN_1): Likewise.
5065 (DR_LEN_2): Likewise.
5066 (DR_LEN_4): Likewise.
5067 (DR_LEN_8): Likewise.
5068 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5069 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5070 (DR_ENABLE_SIZE): Likewise.
5071 (DR_LOCAL_SLOWDOWN): Likewise.
5072 (DR_GLOBAL_SLOWDOWN): Likewise.
5073 (DR_CONTROL_RESERVED): Likewise.
5074 (I386_DR_CONTROL_MASK): Likewise.
5075 (I386_DR_VACANT): Likewise.
5076 (I386_DR_LOCAL_ENABLE): Likewise.
5077 (I386_DR_GLOBAL_ENABLE): Likewise.
5078 (I386_DR_DISABLE): Likewise.
5079 (I386_DR_SET_RW_LEN): Likewise.
5080 (I386_DR_GET_RW_LEN): Likewise.
5081 (I386_DR_WATCH_HIT): Likewise.
5082 (i386_wp_op_t): Likewise.
5083 (i386_show_dr): Likewise.
5084 (i386_length_and_rw_bits): Likewise.
5085 (i386_insert_aligned_watchpoint): Likewise.
5086 (i386_remove_aligned_watchpoint): Likewise.
5087 (i386_handle_nonaligned_watchpoint): Likewise.
5088 i386_update_inferior_debug_regs(): Likewise.
5089 (i386_dr_insert_watchpoint): Likewise.
5090 (i386_dr_remove_watchpoint): Likewise.
5091 (i386_dr_region_ok_for_watchpoint): Likewise.
5092 (i386_dr_stopped_data_address): Likewise.
5093 (i386_dr_stopped_by_watchpoint): Likewise.
5095 2014-06-19 Gary Benson <gbenson@redhat.com>
5097 * i386-low.c (i386_dr_show): Renamed to
5098 i386_show_dr and made static. All uses updated.
5099 (i386_dr_length_and_rw_bits): Renamed to
5100 i386_length_and_rw_bits and made static.
5102 (i386_dr_insert_aligned_watchpoint): Renamed to
5103 i386_insert_aligned_watchpoint and made static.
5105 (i386_dr_remove_aligned_watchpoint): Renamed to
5106 i386_remove_aligned_watchpoint and made static.
5108 (i386_dr_update_inferior_debug_regs): Renamed to
5109 i386_update_inferior_debug_regs and made static.
5112 2014-06-18 Gary Benson <gbenson@redhat.com>
5114 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5115 (i386_dr_low_can_set_control): Likewise.
5116 (i386_get_debug_register_length): Likewise.
5117 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5118 (i386_dr_low_can_set_control): Likewise.
5119 (i386_get_debug_register_length): Likewise.
5121 2014-06-17 Gary Benson <gbenson@redhat.com>
5123 * i386-low.h (i386-dregs.h): New include.
5124 (DR_FIRSTADDR): Now in i386-dregs.h.
5125 (DR_LASTADDR): Likewise.
5126 (DR_NADDR): Likewise.
5127 (DR_STATUS): Likewise.
5128 (DR_CONTROL): Likewise.
5129 (i386_debug_reg_state): Likewise.
5130 (i386_dr_insert_watchpoint): Likewise.
5131 (i386_dr_remove_watchpoint): Likewise.
5132 (i386_dr_region_ok_for_watchpoint): Likewise.
5133 (i386_dr_stopped_data_address): Likewise.
5134 (i386_dr_stopped_by_watchpoint): Likewise.
5135 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5137 2014-06-18 Gary Benson <gbenson@redhat.com>
5139 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5140 i386_dr_insert_watchpoint.
5141 (i386_low_remove_watchpoint): Renamed to
5142 i386_dr_remove_watchpoint.
5143 (i386_low_region_ok_for_watchpoint): Renamed to
5144 i386_dr_region_ok_for_watchpoint.
5145 (i386_low_stopped_data_address): Renamed to
5146 i386_dr_stopped_data_address.
5147 (i386_low_stopped_by_watchpoint): Renamed to
5148 i386_dr_stopped_by_watchpoint.
5149 * i386-low.c (i386_show_dr): Renamed to
5150 i386_dr_show and made nonstatic. All uses updated.
5151 (i386_length_and_rw_bits): Renamed to
5152 i386_dr_length_and_rw_bits and made nonstatic.
5154 (i386_insert_aligned_watchpoint): Renamed to
5155 i386_dr_insert_aligned_watchpoint and made nonstatic.
5157 (i386_remove_aligned_watchpoint): Renamed to
5158 i386_dr_remove_aligned_watchpoint and made nonstatic.
5160 (i386_update_inferior_debug_regs): Renamed to
5161 i386_dr_update_inferior_debug_regs and made nonstatic.
5163 (i386_low_insert_watchpoint): Renamed to
5164 i386_dr_insert_watchpoint. All uses updated.
5165 (i386_low_remove_watchpoint): Renamed to
5166 i386_dr_remove_watchpoint. All uses updated.
5167 (i386_low_region_ok_for_watchpoint): Renamed to
5168 i386_dr_region_ok_for_watchpoint. All uses updated.
5169 (i386_low_stopped_data_address): Renamed to
5170 i386_dr_stopped_data_address. All uses updated.
5171 (i386_low_stopped_by_watchpoint): Renamed to
5172 i386_dr_stopped_by_watchpoint. All uses updated.
5174 2014-06-18 Gary Benson <gbenson@redhat.com>
5176 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5177 (i386_dr_low_can_set_control): Likewise.
5178 (i386_insert_aligned_watchpoint): New check.
5180 2014-06-18 Gary Benson <gbenson@redhat.com>
5182 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5185 2014-06-18 Gary Benson <gbenson@redhat.com>
5187 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5188 instead of fatal and error.
5189 (i386_handle_nonaligned_watchpoint): Likewise.
5191 2014-06-18 Gary Benson <gbenson@redhat.com>
5193 * i386-low.c (i386_get_debug_register_length): New macro.
5194 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5195 (i386_show_dr): Use debug_printf instead of fprintf. Use
5196 phex to format values.
5198 2014-06-18 Gary Benson <gbenson@redhat.com>
5200 * i386-low.h: Comment changes.
5201 * i386-low.c: Likewise.
5203 2014-06-18 Gary Benson <gbenson@redhat.com>
5205 * i386-low.c: Whitespace changes.
5207 2014-06-12 Tom Tromey <tromey@redhat.com>
5209 * utils.c (freeargv): Remove.
5211 2014-06-12 Tom Tromey <tromey@redhat.com>
5213 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5214 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5215 (parse_debug_format_options): Likewise.
5216 (gdbserver_usage): Likewise.
5217 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5218 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5219 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5221 ($(LIBGNU)): Depend on libiberty.
5222 (all-lib): Recurse into all subdirs.
5223 (install-only): Invoke "install" target in subdirs.
5224 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5226 * configure: Rebuild.
5227 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5228 for vasprintf, vsnprintf, or gettimeofday.
5229 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5232 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5234 * development.sh: Delete.
5235 * Makefile.in (config.status): Adjust dependency on development.sh.
5236 * configure.ac: Adjust development.sh source call.
5237 * configure: Regenerate.
5239 2014-06-02 Pedro Alves <palves@redhat.com>
5241 * ax.c (gdb_free_agent_expr): New function.
5242 * ax.h (gdb_free_agent_expr): New declaration.
5243 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5245 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5247 (clear_breakpoint_conditions_and_commands): New function.
5248 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5249 (clear_breakpoint_conditions_and_commands): New declaration.
5251 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5253 * linux-aarch64-low.c (asm/ptrace.h): Include.
5255 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5257 Fix TLS access for -static -pthread.
5258 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5259 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5260 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5262 2014-05-20 Pedro Alves <palves@redhat.com>
5264 * linux-aarch64-low.c (aarch64_insert_point)
5265 (aarch64_remove_point): No longer check whether the type is
5266 supported here. Adjust to new interface.
5267 (the_low_target): Install aarch64_supports_z_point_type as
5268 supports_z_point_type method.
5269 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5270 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5271 instead of a Z packet char. Adjust.
5272 (arm_supports_z_point_type): New function.
5273 (arm_insert_point, arm_remove_point): Adjust to new interface.
5274 (the_low_target): Install arm_supports_z_point_type.
5275 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5276 (cris_insert_point, cris_remove_point): Adjust to new interface.
5277 Don't check whether the type is supported here.
5278 (the_low_target): Install cris_supports_z_point_type.
5279 * linux-low.c (linux_supports_z_point_type): New function.
5280 (linux_insert_point, linux_remove_point): Adjust to new interface.
5281 * linux-low.h (struct linux_target_ops) <insert_point,
5282 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5283 raw_breakpoint pointer parameter.
5284 <supports_z_point_type>: New method.
5285 * linux-mips-low.c (mips_supports_z_point_type): New function.
5286 (mips_insert_point, mips_remove_point): Adjust to new interface.
5287 Use mips_supports_z_point_type.
5288 (the_low_target): Install mips_supports_z_point_type.
5289 * linux-ppc-low.c (the_low_target): Install NULL as
5290 supports_z_point_type method.
5291 * linux-s390-low.c (the_low_target): Install NULL as
5292 supports_z_point_type method.
5293 * linux-sparc-low.c (the_low_target): Install NULL as
5294 supports_z_point_type method.
5295 * linux-x86-low.c (x86_supports_z_point_type): New function.
5296 (x86_insert_point): Adjust to new insert_point interface. Use
5297 insert_memory_breakpoint. Adjust to new
5298 i386_low_insert_watchpoint interface.
5299 (x86_remove_point): Adjust to remove_point interface. Use
5300 remove_memory_breakpoint. Adjust to new
5301 i386_low_remove_watchpoint interface.
5302 (the_low_target): Install x86_supports_z_point_type.
5303 * lynx-low.c (lynx_target_ops): Install NULL as
5304 supports_z_point_type callback.
5305 * nto-low.c (nto_supports_z_point_type): New.
5306 (nto_insert_point, nto_remove_point): Adjust to new interface.
5307 (nto_target_ops): Install nto_supports_z_point_type.
5308 * mem-break.c: Adjust intro comment.
5309 (struct raw_breakpoint) <raw_type, size>: New fields.
5310 <inserted>: Update comment.
5311 <shlib_disabled>: Delete field.
5312 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5313 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5314 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5315 (raw_bkpt_type_to_target_hw_bp_type): New function.
5316 (find_enabled_raw_code_breakpoint_at): New function.
5317 (find_raw_breakpoint_at): New type and size parameters. Use them.
5318 (insert_memory_breakpoint): New function, based off
5319 set_raw_breakpoint_at.
5320 (remove_memory_breakpoint): New function.
5321 (set_raw_breakpoint_at): Reimplement.
5322 (set_breakpoint): New, based on set_breakpoint_at.
5323 (set_breakpoint_at): Reimplement.
5324 (delete_raw_breakpoint): Go through the_target->remove_point
5325 instead of assuming memory breakpoints.
5326 (find_gdb_breakpoint_at): Delete.
5327 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5328 (find_gdb_breakpoint): New function.
5329 (set_gdb_breakpoint_at): Delete.
5330 (z_type_supported): New function.
5331 (set_gdb_breakpoint_1): New function, loosely based off
5332 set_gdb_breakpoint_at.
5333 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5334 (delete_gdb_breakpoint_at): Delete.
5335 (delete_gdb_breakpoint_1): New function, loosely based off
5336 delete_gdb_breakpoint_at.
5337 (delete_gdb_breakpoint): New function.
5338 (clear_gdb_breakpoint_conditions): Rename to ...
5339 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5341 (add_condition_to_breakpoint): Make static.
5342 (add_breakpoint_condition): Take a struct breakpoint pointer
5343 instead of an address. Adjust.
5344 (gdb_condition_true_at_breakpoint): Rename to ...
5345 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5347 (gdb_condition_true_at_breakpoint): Reimplement.
5348 (add_breakpoint_commands): Take a struct breakpoint pointer
5349 instead of an address. Adjust.
5350 (gdb_no_commands_at_breakpoint): Rename to ...
5351 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5352 parameter. Return true if no breakpoint was found. Change debug
5354 (gdb_no_commands_at_breakpoint): Reimplement.
5355 (run_breakpoint_commands): Rename to ...
5356 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5357 and change return type to boolean.
5358 (run_breakpoint_commands): New function.
5359 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5360 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5361 breakpoint. Go through the_target->remove_point instead of
5362 assuming memory breakpoint.
5363 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5364 software and hardware breakpoints.
5365 (reinsert_raw_breakpoint): Go through the_target->insert_point
5366 instead of assuming memory breakpoint.
5367 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5368 software and hardware breakpoints.
5369 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5370 Check both software and hardware breakpoints.
5371 (validate_inserted_breakpoint): Assert the breakpoint is a
5372 software breakpoint. Set the inserted flag to -1 instead of
5373 setting shlib_disabled.
5374 (delete_disabled_breakpoints): Adjust.
5375 (validate_breakpoints): Only validate software breakpoints.
5376 Adjust to inserted flag change.
5377 (check_mem_read, check_mem_write): Skip breakpoint types other
5378 than software breakpoints. Adjust to inserted flag change.
5379 * mem-break.h (enum raw_bkpt_type): New enum.
5380 (raw_breakpoint, struct process_info): Forward declare.
5381 (Z_packet_to_target_hw_bp_type): Delete declaration.
5382 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5383 (set_gdb_breakpoint, delete_gdb_breakpoint)
5384 (clear_breakpoint_conditions): New declarations.
5385 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5386 (breakpoint_inserted_here): Update comment.
5387 (add_breakpoint_condition, add_breakpoint_commands): Replace
5388 address parameter with a breakpoint pointer parameter.
5389 (gdb_breakpoint_here): Update comment.
5390 (delete_gdb_breakpoint_at): Delete.
5391 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5392 * server.c (process_point_options): Take a struct breakpoint
5393 pointer instead of an address. Adjust.
5394 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5395 delete_gdb_breakpoint.
5396 * spu-low.c (spu_target_ops): Install NULL as
5397 supports_z_point_type method.
5398 * target.h: Include mem-break.h.
5399 (struct target_ops) <prepare_to_access_memory>: Update comment.
5400 <supports_z_point_type>: New field.
5401 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5402 instead of a char. Also take a raw breakpoint pointer.
5403 * win32-arm-low.c (the_low_target): Install NULL as
5404 supports_z_point_type.
5405 * win32-i386-low.c (i386_supports_z_point_type): New function.
5406 (i386_insert_point, i386_remove_point): Adjust to new interface.
5407 (the_low_target): Install i386_supports_z_point_type.
5408 * win32-low.c (win32_supports_z_point_type): New function.
5409 (win32_insert_point, win32_remove_point): Adjust to new interface.
5410 (win32_target_ops): Install win32_supports_z_point_type.
5411 * win32-low.h (struct win32_target_ops):
5412 <supports_z_point_type>: New method.
5413 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5414 instead of a char. Also take a raw breakpoint pointer.
5416 2014-05-20 Pedro Alves <palves@redhat.com>
5418 * mem-break.h: Include break-common.h.
5419 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5420 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5421 (Z_packet_to_target_hw_bp_type): New declaration.
5422 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5423 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5424 (Z_PACKET_ACCESS_WP): Delete macros.
5425 (Z_packet_to_hw_type): Delete function.
5426 * i386-low.h: Don't include break-common.h here.
5427 (Z_packet_to_hw_type): Delete declaration.
5428 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5429 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5430 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5431 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5432 * linux-aarch64-low.c: Don't include break-common.h here.
5433 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5434 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5435 (Z_packet_to_target_hw_bp_type): Delete function.
5436 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5438 (mips_insert_point, mips_remove_point): Use
5439 Z_packet_to_target_hw_bp_type.
5441 2014-05-20 Pedro Alves <palves@redhat.com>
5443 * linux-aarch64-low.c: Include break-common.h.
5444 (enum target_point_type): Delete.
5445 (Z_packet_to_point_type): Rename to ...
5446 (Z_packet_to_target_hw_bp_type): ... this, and return a
5447 target_hw_bp_type instead.
5448 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5449 instead of an enum target_point_type.
5450 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5452 (aarch64_dr_state_insert_one_point)
5453 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5454 (aarch64_handle_aligned_watchpoint)
5455 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5456 Take an enum target_hw_bp_type instead of an enum
5458 (aarch64_supports_z_point_type): New function.
5459 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5460 use Z_packet_to_target_hw_bp_type.
5462 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5464 * configure.ac: Only use -Werror by default when DEVELOPMENT
5466 * configure: Regenerate.
5468 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5470 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5471 * linux-x86-low.c (X86_64_USER_REGS): New.
5472 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5474 2014-04-28 Yao Qi <yao@codesourcery.com>
5476 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5479 2014-04-25 Pedro Alves <palves@redhat.com>
5482 * linux-low.c (linux_attach_fail_reason_string): New function.
5483 (linux_attach_lwp): Delete.
5484 (linux_attach_lwp_1): Rename to ...
5485 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5486 argument. Remove "initial" parameter. Return int instead of
5487 void. Don't error or warn here.
5488 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5489 failure to attach to the tgid. Call warning when failing to
5491 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5492 argument. Remove "initial" parameter. Return int instead of
5493 void. Don't error or warn here.
5494 (linux_attach_fail_reason_string): New declaration.
5495 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5496 interface change. Use linux_attach_fail_reason_string.
5498 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5499 Walfred Tedeschi <walfred.tedeschi@intel.com>
5501 * Makefile.in: Added rules to handle new files
5502 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5503 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5504 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5505 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5506 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5507 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5509 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5510 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5511 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5512 i386/x32-avx512.xml.
5513 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5514 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5515 i386/x32-avx512-linux.xml.
5516 * i387-fp.c (num_avx512_k_registers): New constant for number
5518 (num_avx512_zmmh_low_registers): New constant for number of
5519 lower ZMM registers (0-15).
5520 (num_avx512_zmmh_high_registers): New constant for number of
5521 higher ZMM registers (16-31).
5522 (num_avx512_ymmh_registers): New contant for number of higher
5523 YMM registers (ymm16-31 added by avx521 on x86_64).
5524 (num_avx512_xmm_registers): New constant for number of higher
5525 XMM registers (xmm16-31 added by AVX512 on x86_64).
5526 (struct i387_xsave): Add space for AVX512 registers.
5527 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5528 Add code to handle AVX512 registers.
5529 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5530 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5531 prototypei from generated file.
5532 (tdesc_amd64_avx512_linux): Likewise.
5533 (init_registers_x32_avx512_linux): Likewise.
5534 (tdesc_x32_avx512_linux): Likewise.
5535 (init_registers_i386_avx512_linux): Likewise.
5536 (tdesc_i386_avx512_linux): Likewise.
5537 (x86_64_regmap): Add AVX512 registers.
5538 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5540 (initialize_low_arch): Add code to initialize AVX512 registers.
5542 2014-04-23 Pedro Alves <palves@redhat.com>
5544 * mem-break.c (find_gdb_breakpoint_at): Make static.
5545 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5547 2014-04-23 Pedro Alves <palves@redhat.com>
5549 * i386-low.c: Don't include break-common.h here.
5550 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5551 prototype to take target_hw_bp_type as argument instead of a Z
5553 * i386-low.h: Include break-common.h here.
5554 (Z_packet_to_hw_type): Declare.
5555 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5557 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5558 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5559 (x86_remove_point): Convert the packet number to a
5560 target_hw_bp_type before calling i386_low_remove_watchpoint.
5561 * win32-i386-low.c (i386_insert_point): Convert the packet number
5562 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5563 (i386_remove_point): Convert the packet number to a
5564 target_hw_bp_type before calling i386_low_remove_watchpoint.
5566 2014-04-23 Pedro Alves <palves@redhat.com>
5568 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5570 2014-04-10 Pedro Alves <palves@redhat.com>
5572 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5573 Check if the condition or command is NULL before checking if the
5574 breakpoint is known. On success, return true.
5575 * mem-break.h (add_breakpoint_condition): Document return.
5576 (add_breakpoint_commands): Add describing comment.
5577 * server.c (skip_to_semicolon): New function.
5578 (process_point_options): Use it.
5580 2014-04-09 Pedro Alves <palves@redhat.com>
5582 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5585 2014-02-27 Pedro Alves <palves@redhat.com>
5588 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5590 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5592 (last_thread_of_process_p): Take a PID argument instead of a
5594 (linux_wait_for_lwp): Delete.
5595 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5597 (linux_low_filter_event): New function, party factored out from
5598 linux_wait_for_event.
5599 (linux_wait_for_event): Rename to ...
5600 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5601 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5602 sigsuspend. Check for zombie leaders.
5603 (linux_wait_for_event): Reimplement as wrapper around
5604 linux_wait_for_event_filtered.
5605 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5606 a normal or signal exit is seen, it's the whole process exiting.
5607 (wait_for_sigstop): No longer a for_each_inferior callback.
5608 Rewrite on top of linux_wait_for_event_filtered.
5609 (stop_all_lwps): Call wait_for_sigstop directly.
5610 * server.c (resume, handle_target_event): Handle
5611 TARGET_WAITKIND_NO_RESUMED.
5613 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5615 * win32-low.c (psapi_get_dll_name,
5616 * win32_CreateToolhelp32Snapshot): Delete.
5617 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5618 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5620 (handle_load_dll): Add function description.
5621 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5623 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5625 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5627 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5628 base address when calling win32_add_one_solib.
5629 (handle_load_dll): Delete local variable load_addr.
5630 Remove 0x1000 offset applied to DLL base address when calling
5631 win32_add_one_solib.
5632 (handle_unload_dll): Add comment.
5634 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5636 * win32-low.c (win32_add_all_dlls): Renames
5637 win32_ensure_ntdll_loaded. Rewrite function documentation.
5638 Adjust implementation to always load all DLLs.
5639 Add 0x1000 offset to DLL base address when calling
5640 win32_add_one_solib.
5641 (child_initialization_done): New static global.
5642 (do_initial_child_stuff): Set child_initialization_done to
5643 zero during child initialization, and 1 after. Replace call
5644 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5646 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5647 (handle_unload_dll): Add function documentation.
5648 (get_child_debug_event): Ignore load and unload DLL events
5649 during child initialization.
5651 2014-02-20 Doug Evans <dje@google.com>
5653 Remove global all_lwps.
5654 * inferiors.h (ptid_of): Move here from linux-low.h.
5655 (pid_of, lwpid_of): Ditto.
5656 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5657 parameter is a struct thread_info * now.
5658 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5659 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5660 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5662 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5663 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5664 * linux-arm-low.c (update_registers_callback): Update, "entry"
5665 parameter is a struct thread_info * now.
5666 Fetch lwpid from current_inferior directly.
5667 (arm_insert_point): Pass &all_threads to find_inferior instead of
5669 (arm_remove_point): Ditto.
5670 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5671 (arm_prepare_to_resume): Fetch pid from thread.
5672 (arm_read_description): Fetch lwpid from current_inferior directly.
5673 * linux-low.c (all_lwps): Delete.
5674 (delete_lwp): Delete call to remove_inferior.
5675 (handle_extended_wait): Fetch lwpid from thread.
5676 (add_lwp): Don't set lwp->entry.id. Remove call to
5677 add_inferior_to_list.
5678 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5679 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5680 (kill_one_lwp_callback): Ditto.
5681 (linux_kill): Don't dereference NULL pointer.
5682 Fetch ptid,lwpid from thread.
5683 (get_detach_signal): Fetch ptid from thread.
5684 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5685 Simplify call to regcache_invalidate_thread.
5686 (delete_lwp_callback): Update, "entry" parameter is a
5687 struct thread_info * now. Fetch pid from thread.
5688 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5689 (status_pending_p_callback): Update, "entry" parameter is a
5690 struct thread_info * now. Fetch ptid from thread.
5691 (find_lwp_pid): Update, "entry" parameter is a
5692 struct thread_info * now.
5693 (linux_wait_for_lwp): Fetch pid from thread.
5694 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5695 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5696 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5697 (dequeue_one_deferred_signal): Ditto.
5698 (cancel_breakpoint): Fetch ptid from current_inferior.
5699 (linux_wait_for_event): Pass &all_threads to find_inferior,
5700 not &all_lwps. Fetch ptid, lwpid from thread.
5701 (count_events_callback): Update, "entry" parameter is a
5702 struct thread_info * now.
5703 (select_singlestep_lwp_callback): Ditto.
5704 (select_event_lwp_callback): Ditto.
5705 (cancel_breakpoints_callback): Ditto.
5706 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5708 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5709 (unsuspend_one_lwp): Update, "entry" parameter is a
5710 struct thread_info * now.
5711 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5713 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5714 Fetch lwpid from thread, not lwp.
5715 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5716 Pass &all_threads to find_inferior, not &all_lwps.
5717 (send_sigstop): Fetch lwpid from thread, not lwp.
5718 (send_sigstop_callback): Update, "entry" parameter is a
5719 struct thread_info * now.
5720 (suspend_and_send_sigstop_callback): Ditto.
5721 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5722 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5723 struct thread_info * now.
5724 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5726 (lwp_running): Update, "entry" parameter is a
5727 struct thread_info * now.
5728 (stop_all_lwps): Fetch ptid from thread.
5729 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5730 (linux_resume_one_lwp): Fetch lwpid from thread.
5731 (linux_set_resume_request): Update, "entry" parameter is a
5732 struct thread_info * now. Fetch pid, lwpid from thread.
5733 (resume_status_pending_p): Update, "entry" parameter is a
5734 struct thread_info * now.
5735 (need_step_over_p): Ditto. Fetch lwpid from thread.
5736 (start_step_over): Fetch lwpid from thread.
5737 (linux_resume_one_thread): Update, "entry" parameter is a
5738 struct thread_info * now. Fetch lwpid from thread.
5739 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5740 (proceed_one_lwp): Update, "entry" parameter is a
5741 struct thread_info * now. Fetch lwpid from thread.
5742 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5743 struct thread_info * now.
5744 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5745 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5746 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5748 (regsets_store_inferior_registers): Ditto.
5749 (fetch_register, store_register): Ditto.
5750 (linux_read_memory, linux_write_memory): Ditto.
5751 (linux_request_interrupt): Ditto.
5752 (linux_read_auxv): Ditto.
5753 (linux_xfer_siginfo): Ditto.
5754 (linux_qxfer_spu): Ditto.
5755 (linux_qxfer_libraries_svr4): Ditto.
5756 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5757 moved to inferiors.h.
5759 (get_thread_lwp): Update.
5760 (struct lwp_info): Delete member "entry". Simplify comment for
5763 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5764 current_inferior directly.
5765 (update_watch_registers_callback): Update, "entry" parameter is a
5766 struct thread_info * now. Fetch pid from thread.
5767 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5768 (mips_insert_point): Fetch lwpid from current_inferior.
5769 Pass &all_threads to find_inferior, not &all_lwps.
5770 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5771 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5773 (mips_stopped_data_address): Ditto.
5774 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5776 * linux-tile-low.c (tile_arch_setup): Ditto.
5777 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5778 (update_debug_registers_callback): Update, "entry" parameter is a
5779 struct thread_info * now. Fetch pid from thread.
5780 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5781 Pass &all_threads to find_inferior, not &all_lwps.
5782 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5783 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5784 Pass &all_threads to find_inferior, not &all_lwps.
5785 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5786 (i386_dr_low_get_status): Ditto.
5787 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5788 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5789 (x86_linux_read_description): Ditto.
5790 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5792 2014-02-20 Doug Evans <dje@google.com>
5794 * inferiors.c (get_first_inferior): Fix buglet.
5796 2014-02-19 Doug Evans <dje@google.com>
5798 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5799 * inferiors.c (add_thread): Change result type to struct thread_info *.
5800 All callers updated.
5801 (add_lwp): Call add_thread here instead of in callers.
5802 All callers updated.
5803 * linux-low.h (get_lwp_thread): Rewrite.
5804 (struct lwp_info): New member "thread".
5806 2014-02-19 Doug Evans <dje@google.com>
5808 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5809 All callers updated.
5811 2014-02-19 Doug Evans <dje@google.com>
5813 * inferiors.c (add_thread): Fix whitespace.
5815 2014-02-19 Doug Evans <dje@google.com>
5817 * dll.c (clear_dlls): Replace accessing list implemention details
5819 * gdbthread.h (get_first_thread): Declare.
5820 * inferiors.c (for_each_inferior_with_data): New function.
5821 (get_first_thread): New function.
5822 (find_thread_ptid): Simplify.
5823 (get_first_inferior): New function.
5824 (clear_list): Delete.
5825 (one_inferior_p): New function.
5826 (clear_inferior_list): New function.
5827 (clear_inferiors): Update.
5828 * inferiors.h (for_each_inferior_with_data): Declare.
5829 (clear_inferior_list): Declare.
5830 (one_inferior_p): Declare.
5831 (get_first_inferior): Declare.
5832 * linux-low.c (linux_wait_for_event): Replace accessing list
5833 implemention details with API function.
5834 * server.c (target_running): Ditto.
5835 (accumulate_file_name_length): New function.
5836 (emit_dll_description): New function.
5837 (handle_qxfer_libraries): Replace accessing list implemention
5838 details with API function.
5839 (handle_qxfer_threads_worker): New function.
5840 (handle_qxfer_threads_proper): Replace accessing list implemention
5841 details with API function.
5842 (handle_query): Ditto.
5843 (visit_actioned_threads_callback_ftype): New typedef.
5844 (visit_actioned_threads_data): New struct.
5845 (visit_actioned_threads): Rewrite to be find_inferior callback.
5846 (resume): Call find_inferior.
5847 (handle_status): Replace accessing list implemention
5848 details with API function.
5849 (process_serial_event): Replace accessing list implemention details
5851 * target.c (set_desired_inferior): Replace accessing list implemention
5852 details with API function.
5853 * tracepoint.c (same_process_p): New function.
5854 (gdb_agent_about_to_close): Replace accessing list implemention
5855 details with API function.
5856 * win32-low.c (child_delete_thread): Replace accessing list
5857 implemention details with API function.
5858 (match_dll_by_basename): New function.
5859 (dll_is_loaded_by_basename): New function.
5860 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5861 details call to dll_is_loaded_by_basename.
5863 2014-02-19 Doug Evans <dje@google.com>
5865 * dll.h (struct dll_info): Add comment.
5866 * gdbthread.h (struct thread_info): Add comment.
5867 (current_ptid): Simplify.
5868 * inferiors.c (add_process): Update.
5869 (remove_process): Update.
5870 * inferiors.h (struct process_info): Rename member "head" to "entry".
5871 * linux-low.c (delete_lwp): Update.
5873 (last_thread_of_process_p): Update.
5874 (kill_one_lwp_callback, linux_kill): Update.
5875 (status_pending_p_callback): Update.
5876 (wait_for_sigstop): Update. Simplify read of ptid.
5877 (start_step_over): Update.
5878 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5879 (get_lwp_thread): Update.
5880 (struct lwp_info): Rename member "head" to "entry".
5881 * regcache.h (inferior_list_entry): Delete.
5882 * server.c (kill_inferior_callback): Update.
5883 (detach_or_kill_inferior_callback): Update.
5884 (print_started_pid): Update.
5885 (print_attached_pid): Update.
5886 (process_serial_event): Simplify read of ptid.
5887 * thread-db.c (thread_db_create_event): Update.
5888 (thread_db_get_tls_address): Update.
5889 * win32-low.c (current_inferior_ptid): Simplify.
5891 2014-02-19 Tom Tromey <tromey@redhat.com>
5893 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5895 (target_supports_btrace): Update.
5897 2014-02-14 Yao Qi <yao@codesourcery.com>
5899 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5900 (rsp-low-ipa.o): New target.
5902 2014-02-12 Tom Tromey <tromey@redhat.com>
5904 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5905 convert_ascii_to_int.
5906 * regcache.c (registers_to_string): Likewise.
5907 * remote-utils.c (decode_M_packet): Likewise.
5908 * server.c (process_serial_event): Likewise.
5910 2014-02-12 Tom Tromey <tromey@redhat.com>
5912 * server.c (handle_query, handle_v_run): Use hex2bin, not
5914 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5916 2014-02-12 Tom Tromey <tromey@redhat.com>
5918 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5919 convert_int_to_ascii.
5920 * regcache.c (registers_to_string, collect_register_as_string):
5922 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5924 * server.c (process_serial_event): Likewise.
5925 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5926 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5928 2014-02-12 Tom Tromey <tromey@redhat.com>
5930 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5931 bin2hex, not hexify.
5932 * tracepoint.c (cmd_qtstatus): Likewise.
5934 2014-02-12 Tom Tromey <tromey@redhat.com>
5936 * remote-utils.c (monitor_output): Pass explicit length to
5939 2014-02-12 Tom Tromey <tromey@redhat.com>
5941 * tracepoint.c: Include rsp-low.h.
5942 * server.c: Include rsp-low.h.
5943 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5944 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5946 * remote-utils.c: Include rsp-low.h.
5947 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5948 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5949 (convert_int_to_ascii, convert_ascii_to_int): Move to
5951 * regcache.c: Include rsp-low.h.
5952 * ax.c: Include rsp-low.h.
5953 * Makefile.in (SFILES): Add common/rsp-low.c.
5954 (OBS): Add rsp-low.o.
5955 (rsp-low.o): New target.
5957 2014-02-12 Tom Tromey <tromey@redhat.com>
5959 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5960 Include print-utils.h.
5961 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5962 (plongest, thirty_two, phex_nz): Remove.
5963 * Makefile.in (SFILES): Add common/print-utils.c.
5964 (OBS): Add print-utils.o.
5965 (print-utils-ipa.o): New target.
5966 (print-utils.o): New target.
5967 (IPA_OBJS): Add print-utils-ipa.o.
5969 2014-02-06 Tom Tromey <tromey@redhat.com>
5971 * Makefile.in (SFILES): Fix indentation.
5973 2014-02-05 Doug Evans <dje@google.com>
5975 * linux-low.c (linux_wait_for_event): Improve comment.
5976 (linux_wait_1): Keep current_inferior in sync with event_child.
5978 2014-01-22 Doug Evans <dje@google.com>
5980 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5982 2014-01-22 Doug Evans <dje@google.com>
5984 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5985 * configure: Regenerate.
5986 * config.in: Regenerate.
5987 * Makefile.in (SFILES): Add debug.c.
5989 * debug.c: New file.
5990 * debug.h: New file.
5991 * linux-aarch64-low.c (*): Update all debugging printfs to use
5992 debug_printf instead of fprintf.
5993 * linux-arm-low.c (*): Ditto.
5994 * linux-cris-low.c (*): Ditto.
5995 * linux-crisv32-low.c (*): Ditto.
5996 * linux-m32r-low.c (*): Ditto.
5997 * linux-sparc-low.c (*): Ditto.
5998 * linux-x86.c (*): Ditto.
5999 * linux-low.c (*): Ditto.
6000 (linux_wait_1): Add calls to debug_enter, debug_exit.
6001 (linux_wait): Remove redundant debugging printf.
6002 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6003 (linux_resume, unstop_all_lwps): Ditto.
6004 * mem-break.c (*): Update all debugging printfs to use
6005 debug_printf instead of fprintf.
6006 * remote-utils.c (*): Ditto.
6007 * thread-db.c (*): Ditto.
6008 * server.c #include <ctype.h>, "gdb_vecs.h".
6009 (debug_threads): Moved to debug.c.
6010 (*): Update all debugging printfs to use debug_printf instead of
6012 (start_inferior): Replace call to fflush with call to debug_flush.
6013 (monitor_show_help): Mention set debug-format.
6014 (parse_debug_format_options): New function.
6015 (handle_monitor_command): Handle "monitor set debug-format".
6016 (gdbserver_usage): Mention --debug-format.
6017 (main): Parse --debug-format.
6018 * server.h (debug_threads): Declaration moved to debug.h.
6020 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6021 trace_debug_1 that uses debug_printf.
6022 (tracepoint_look_up_symbols): Update all debugging printfs to use
6023 debug_printf instead of fprintf.
6025 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6027 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6030 2014-01-17 Pedro Alves <palves@redhat.com>
6033 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6034 defined after including gdb_proc_service.h.
6036 2014-01-16 Doug Evans <dje@google.com>
6038 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6039 (match_dll): Use it.
6041 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6043 * target.h (target_ops) <read_btrace>: Change parameters and
6044 return type to allow error reporting.
6045 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6046 trace reading errors on.
6047 * linux-low.c (linux_low_read_btrace): Pass trace reading
6049 (linux_low_disable_btrace): New.
6051 2014-01-15 Doug Evans <dje@google.com>
6053 * inferiors.c (thread_id_to_gdb_id): Delete.
6054 * inferiors.h (thread_id_to_gdb_id): Delete.
6056 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6058 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6059 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6062 2014-01-08 Pedro Alves <palves@redhat.com>
6064 * server.c (handle_status): Don't discard previous queued stop
6065 replies or thread's pending status here.
6066 (main) <disconnection>: Do it here instead.
6068 2014-01-08 Pedro Alves <palves@redhat.com>
6070 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6071 * server.c (visit_actioned_threads, handle_pending_status): New
6073 (handle_v_cont): Factor out parts to ...
6074 (resume): ... this new function. If in all-stop, and a thread
6075 being resumed has a pending status, report it without actually
6077 (myresume): Adjust to use the new 'resume' function.
6078 (clear_pending_status_callback, set_pending_status_callback)
6079 (find_status_pending_thread_callback): New functions.
6080 (handle_status): Handle the case of multiple threads having
6081 interesting statuses to report. Report threads' real last signal
6082 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6083 with an interesting thread to report the status for, instead of
6084 always reporting the status of the first thread.
6086 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6088 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6089 * gdbreplay.c (gdbreplay_version): Likewise.
6091 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6093 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6094 iov.iov_len with the real length in use.
6096 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6098 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6099 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6100 for all targets that use win32-low.c.
6101 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6102 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6104 2013-12-13 Pedro Alves <palves@redhat.com>
6106 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6107 if equal to TARGET_WAITKIND_LOADED.
6108 * win32-low.c (cached_status): New static global.
6109 (win32_wait): Add declaration.
6110 (do_initial_child_stuff): Flush all initial pending debug events
6111 up to the initial breakpoint.
6112 (win32_wait): If CACHED_STATUS was set, return that instead
6113 of doing a real wait. Remove the code resuming the execution
6114 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6115 during the initial phase. Also remove the code changing
6116 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6117 TARGET_WAITKIND_STOPPED.
6119 2013-12-11 Yao Qi <yao@codesourcery.com>
6121 * notif.c (handle_notif_ack): Return 0 if no notification
6124 2013-11-20 Doug Evans <dje@google.com>
6126 * linux-low.c (linux_set_resume_request): Fix comment.
6128 2013-11-20 Doug Evans <dje@google.com>
6130 * linux-low.c (resume_status_pending_p): Tweak comment.
6132 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6134 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6135 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6136 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6137 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6138 (srv_amd64_regobj): Add amd64-mpx.o.
6139 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6140 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6141 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6142 * i387-fp.c (num_pl_bnd_register) Added constant.
6143 (num_pl_bnd_cfg_registers) Added constant.
6144 (struct i387_xsave) Added reserved area and MPX fields.
6145 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6146 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6148 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6149 (init_registers_amd64_mpx_linux): Declare new function.
6150 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6151 (x86_64_regmap): Add MPX registers.
6152 (x86_linux_read_description): Add MPX case.
6153 (initialize_low_arch): Initialize MPX targets.
6155 2013-11-18 Tom Tromey <tromey@redhat.com>
6157 * configure: Rebuild.
6158 * configure.ac: Don't check for stdlib.h.
6159 * gdbreplay.c: Unconditionally include stdlib.h.
6161 2013-11-18 Tom Tromey <tromey@redhat.com>
6163 * config.in: Rebuild.
6164 * configure: Rebuild.
6165 * configure.ac: Don't use AC_HEADER_DIRENT.
6167 2013-11-18 Tom Tromey <tromey@redhat.com>
6169 * server.h: Don't check HAVE_STRING_H.
6170 * gdbreplay.c: Don't check HAVE_STRING_H.
6171 * configure: Rebuild.
6173 2013-11-18 Tom Tromey <tromey@redhat.com>
6175 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6178 2013-11-08 Tom Tromey <tromey@redhat.com>
6180 * configure, config.in: Rebuild.
6181 * configure.ac: Remove unused configury.
6183 2013-11-08 Tom Tromey <tromey@redhat.com>
6185 * acinclude.m4: Include common.m4, codeset.m4.
6186 * configure, config.in: Rebuild.
6187 * configure.ac: Use GDB_AC_COMMON.
6189 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6191 * linux-s390-low.c (HWCAP_S390_TE): New define.
6192 (s390_arch_setup): Consider the TE field in the HWCAP for
6193 determining 'have_regset_tdb'.
6195 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6198 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6201 2013-10-02 Pedro Alves <palves@redhat.com>
6203 * server.c (process_serial_event): Don't output "GDBserver
6204 exiting" if GDB is connected through stdio.
6205 * target.c (mywait): Likewise, be silent if GDB is connected
6208 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6210 * lynx-low.c (lynx_add_threads_after_attach): New function.
6211 (lynx_attach): Remove call to add_thread. Add call to
6212 lynx_add_threads_after_attach instead.
6214 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6216 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6217 * config.in, configure: Regenerated.
6219 2013-09-18 Yao Qi <yao@codesourcery.com>
6222 * server.c (start_inferior): Clear 'resume_info'.
6224 2013-09-16 Jiong Wang <jiwang@tilera.com>
6226 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6229 2013-09-16 Jiong Wang <jiwang@tilera.com>
6231 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6232 linux-tile-low.o to srv_tgtobj.
6234 2013-09-16 Will Newton <will.newton@linaro.org>
6236 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6239 2013-09-06 Pedro Alves <palves@redhat.com>
6241 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6242 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6243 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6244 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6245 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6246 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6248 2013-09-06 Pedro Alves <palves@redhat.com>
6250 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6251 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6253 2013-09-06 Pedro Alves <palves@redhat.com>
6255 * linux-amd64-ipa.c: Include tracepoint.h.
6256 * linux-i386-ipa.c: Include tracepoint.h.
6258 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6260 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6261 (ps_get_thread_area): New function.
6263 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6265 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6266 (initialize_low_arch): Call init_registers_crisv32 rather than
6267 init_register_crisv32.
6269 2013-09-05 Pedro Alves <palves@redhat.com>
6271 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6273 * hostio.h: ... this new file.
6274 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6275 win32-low.c: Include hostio.h.
6277 2013-09-05 Pedro Alves <palves@redhat.com>
6279 * server.h (gdb_client_data, handler_func, callback_handler_func)
6280 (delete_file_handler, add_file_handler, append_callback_event)
6281 (delete_callback_event, start_event_loop, initialize_event_loop):
6282 Move to event-loop.h and include it.
6283 * event-loop.h: New file.
6285 2013-09-05 Pedro Alves <palves@redhat.com>
6287 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6288 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6289 (loaded_dll, unloaded_dll): Move to ...
6290 * dll.h: ... this new file.
6291 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6293 2013-09-05 Pedro Alves <palves@redhat.com>
6295 * server.h (current_process, get_thread_process, all_processes)
6296 (add_inferior_to_list, for_each_inferior, current_inferior)
6297 (remove_inferior, add_process, remove_process, find_process_pid)
6298 (have_started_inferiors_p, have_attached_inferiors_p)
6299 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6300 (clear_inferiors, find_inferior, find_inferior_id)
6301 (inferior_target_data, set_inferior_target_data)
6302 (inferior_regcache_data, set_inferior_regcache_data): Move to
6303 inferiors.h, and include it.
6304 * inferiors.h: New file.
6306 2013-09-05 Pedro Alves <palves@redhat.com>
6308 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6312 2013-09-05 Pedro Alves <palves@redhat.com>
6314 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6316 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6317 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6318 (handle_tracepoint_general_set, handle_tracepoint_query)
6319 (tracepoint_finished_step, tracepoint_was_hit)
6320 (release_while_stepping_state_list, current_traceframe)
6321 (in_readonly_region, traceframe_read_mem)
6322 (fetch_traceframe_registers, traceframe_read_sdata)
6323 (traceframe_read_info, struct fast_tpoint_collect_status)
6324 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6325 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6326 (supply_fast_tracepoint_registers)
6327 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6328 (ipa_tdesc, claim_trampoline_space)
6329 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6330 (agent_mem_read, agent_get_trace_state_variable_value)
6331 (agent_set_trace_state_variable_value, agent_tsv_read)
6332 (agent_mem_read_string, get_raw_reg_func_addr)
6333 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6334 * tracepoint.h: ... this new file.
6336 2013-09-05 Pedro Alves <palves@redhat.com>
6338 * server.h (perror_with_name, error, fatal, warning, paddress)
6339 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6341 * utils.h: New file.
6343 2013-09-05 Pedro Alves <palves@redhat.com>
6345 * server.h (remote_debug, noack_mode, transport_is_reliable)
6346 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6347 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6348 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6349 (write_enn, initialize_async_io, enable_async_io)
6350 (disable_async_io, check_remote_input_interrupt_request)
6351 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6352 (dead_thread_notify, prepare_resume_reply)
6353 (decode_address_to_semicolon, decode_address, decode_m_packet)
6354 (decode_M_packet, decode_X_packet, decode_xfer_write)
6355 (decode_search_memory_packet, unhexify, hexify)
6356 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6357 (look_up_one_symbol, relocate_instruction)
6358 (monitor_output): Move to remote-utils.h, and include it.
6359 * remote-utils.h: New file.
6361 2013-09-05 Pedro Alves <palves@redhat.com>
6363 * server.h (_): Delete.
6365 2013-09-02 Pedro Alves <palves@redhat.com>
6367 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6368 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6370 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6372 2013-09-02 Pierre Muller <muller@sourceware.org>
6374 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6375 or WriteProcessMemory complete successfully and handle
6376 ERROR_PARTIAL_COPY error.
6378 2013-09-02 Pedro Alves <palves@redhat.com>
6380 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6381 error instead of EIO.
6383 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6386 * linux-low.c: Include filestuff.h.
6387 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6388 * lynx-low.c: Include filestuff.h.
6389 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6390 * server.c: Include filestuff.h.
6391 (main): Call notice_open_fds.
6392 * spu-low.c: Include filestuff.h.
6393 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6395 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6397 * Makefile.in: Explain why ../target and ../nat are not
6398 listed as include file search paths.
6399 (linux-waitpid.o): New object file rule.
6400 * configure.srv (srv_native_linux_obj): New variable.
6401 Replace all occurrences of linux native object files with
6402 $srv_native_linux_obj.
6403 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6404 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6405 (linux_enable_event_reporting): Remove declaration.
6406 (my_waitpid): Moved to common/linux-waitpid.c.
6407 (linux_wait_for_event): Pass ptid when calling
6408 linux_enable_event_reporting.
6409 (linux_supports_tracefork_flag): Remove.
6410 (linux_enable_event_reporting): Likewise.
6411 (linux_tracefork_grandchild): Remove.
6412 (STACK_SIZE): Moved to common/linux-ptrace.c.
6413 (linux_tracefork_child): Remove.
6414 (linux_test_for_tracefork): Remove.
6415 (linux_look_up_symbols): Call linux_supports_traceclone.
6416 (initialize_low): Remove call to linux_test_for_tracefork.
6417 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6418 common/linux-ptrace.h.
6419 (PTRACE_TYPE_ARG4): Likewise.
6420 Include linux-ptrace.h.
6422 2013-08-21 Pedro Alves <palves@redhat.com>
6424 * config.in: Renegerate.
6426 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6428 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6429 (SFILES): Remove $(srcdir)/common/target-common.c and
6430 add $(srcdir)/target/waitstatus.c.
6431 (OBS): Remove target-common.o and add waitstatus.o.
6432 (server_h): Remove $(srcdir)/../common/target-common.h and
6433 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6434 and $(srcdir)/../target/waitstatus.h.
6435 (target-common.o): Remove.
6436 (waitstatus.o): New target object file.
6437 * target.h: Do not include target-common.h and
6438 include target/resume.h, target/wait.h and
6439 target/waitstatus.h.
6441 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6443 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6444 to PTRACE_TYPE_ARG3.
6445 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6446 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6448 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6449 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6451 2013-07-27 Jie Zhang <jie@codesourcery.com>
6452 Daniel Jacobowitz <dan@codesourcery.com>
6453 Yao Qi <yao@codesourcery.com>
6455 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6456 (mips-linux-watch.o): New rule.
6457 (mips_linux_watch_h): New variable.
6458 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6460 * linux-mips-low.c: Include mips-linux-watch.h.
6461 (struct arch_process_info, struct arch_lwp_info): New.
6462 (update_watch_registers_callback): New function.
6463 (mips_linux_new_process, mips_linux_new_thread) New functions.
6464 (mips_linux_prepare_to_resume, mips_insert_point): New
6466 (mips_remove_point, mips_stopped_by_watchpoint): New
6468 (rsp_bp_type_to_target_hw_bp_type): New function.
6469 (mips_stopped_data_address): New function.
6470 (the_low_target): Add watchpoint support functions.
6472 2013-07-27 Yao Qi <yao@codesourcery.com>
6474 * i386-low.c: Include break-common.h.
6475 (enum target_hw_bp_type): Remove.
6477 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6479 * Makefile.in (SFILES): /common/target-common.c.
6480 (OBS): Add target-common.o.
6481 (server_h): Add $(srcdir)/../common/target-common.h.
6482 (target-common.o): New target.
6483 * server.c (queue_stop_reply_callback): Free
6484 status string after use.
6485 * target.c (target_waitstatus_to_string): Remove.
6486 * target.h: Include target-common.h.
6487 (resume_kind): Likewise.
6488 (target_waitkind): Likewise.
6489 (target_waitstatus): Likewise.
6490 (TARGET_WNOHANG): Likewise.
6492 2013-07-04 Yao Qi <yao@codesourcery.com>
6494 * Makefile.in (host_alias): Use @host_noncanonical@.
6495 (target_alias): Use @target_noncanonical@.
6496 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6497 ACX_NONCANONICAL_HOST.
6498 * configure: Regenerated.
6501 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6503 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6504 * configure: Rebuild.
6505 * Makefile.in (version_host, version_target): Get from configure.
6506 (version.c): Use $(version_host) and $(version_target).
6508 2013-07-03 Pedro Alves <palves@redhat.com>
6510 * Makefile.in (config.status): Depend on development.sh.
6511 * acinclude.m4: Include libmcheck.m4.
6512 * configure: Regenerate.
6514 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6516 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6517 attribute inside the parentheses.
6518 (winapi_DebugSetProcessKillOnExit): Ditto.
6519 (winapi_DebugBreakProcess): Ditto.
6520 (winapi_GenerateConsoleCtrlEvent): Ditto.
6522 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6524 * notif.h (notif_event): Add a dummy member to avoid compiler
6527 2013-07-01 Pedro Alves <palves@redhat.com>
6529 * hostio.c (HOSTIO_PATH_MAX): Define.
6530 (require_filename, handle_open, handle_unlink, handle_readlink):
6533 2013-07-01 Pedro Alves <palves@redhat.com>
6535 * server.h: Include "pathmax.h".
6536 * linux-low.c: Don't include sys/param.h.
6537 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6539 * win32-low.c: Don't include sys/param.h.
6540 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6542 2013-07-01 Pedro Alves <palves@redhat.com>
6544 * event-loop.c: Don't check HAVE_UNISTD_H before including
6546 * gdbreplay.c: Likewise.
6547 * remote-utils.c: Likewise.
6548 * server.c: Likewise.
6549 * configure.ac: Don't check for unistd.h.
6550 * configure: Regenerate.
6552 2013-06-28 Tom Tromey <tromey@redhat.com>
6554 * Makefile.in (version.c): Use version.in, not
6557 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6559 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6560 * configure: Rebuild.
6561 * Makefile.in (version_host, version_target): Get from configure.
6562 (version.c): Use $(version_host) and $(version_target).
6564 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6566 Fix trace-status to output user name without trailing colon.
6567 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6569 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6571 Fix trace-status to output proper start-time and stop-time.
6572 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6573 output start time and stop time in hex as gdb expects.
6575 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6577 * tracepoint.c (build_traceframe_info_xml): Output trace state
6578 variables present in the trace buffer.
6580 2013-06-24 Tom Tromey <tromey@redhat.com>
6582 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6584 (version.o): Remove.
6585 * gdbreplay.c: Include version.h.
6586 (version, host_name): Don't declare.
6587 * server.h: Include version.h.
6588 (version, host_name): Don't declare.
6590 2013-06-12 Pedro Alves <palves@redhat.com>
6592 * linux-x86-low.c (linux_is_elf64): Delete global.
6593 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6594 with local linux_pid_exe_is_elf_64_file use.
6596 2013-06-11 Pedro Alves <palves@redhat.com>
6598 * linux-low.c (regset_disabled, disable_regset): New functions.
6599 (regsets_fetch_inferior_registers)
6600 (regsets_store_inferior_registers): Use them.
6601 (initialize_regsets_info); Don't allocate the disabled_regsets
6603 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6606 2013-06-11 Pedro Alves <palves@redhat.com>
6608 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6611 2013-06-11 Pedro Alves <palves@redhat.com>
6613 * linux-x86-low.c (initialize_low_arch): Call
6614 init_registers_x32_avx_linux.
6616 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6618 Fix compatibility with Android Bionic.
6619 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6622 2013-06-07 Pedro Alves <palves@redhat.com>
6625 * Makefile.in (OBS): Add tdesc.o.
6626 (IPA_OBJS): Add tdesc-ipa.o.
6627 (tdesc-ipa.o): New rule.
6628 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6630 * linux-low.c (new_inferior): Delete.
6631 (disabled_regsets, num_regsets): Delete.
6632 (linux_add_process): Adjust to set the new per-process
6634 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6635 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6636 was a stop. When calling arch_setup, switch the current inferior
6637 to the thread that got an event.
6638 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6639 (regsets_fetch_inferior_registers)
6640 (regsets_store_inferior_registers): New regsets_info parameter.
6642 (linux_register_in_regsets): New regs_info parameter. Adjust to
6644 (register_addr, fetch_register, store_register): New usrregs_info
6645 parameter. Adjust to use it.
6646 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6647 parameter regs_info. Adjust to use it.
6648 (linux_fetch_registers): Get the current inferior's regs_info, and
6650 (linux_store_registers): Ditto.
6651 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6652 (initialize_low): Don't initialize the target_regsets here. Call
6653 initialize_low_arch.
6654 * linux-low.h (target_regsets): Delete declaration.
6655 (struct regsets_info): New.
6656 (struct usrregs_info): New.
6657 (struct regs_info): New.
6658 (struct process_info_private) <new_inferior>: New field.
6659 (struct linux_target_ops): Delete the num_regs, regmap, and
6660 regset_bitmap fields. New field regs_info.
6661 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6662 * i387-fp.c (num_xmm_registers): Delete.
6663 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6664 calls to new interface.
6665 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6666 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6667 Infer the number of xmm registers from the regcache's target
6669 * i387-fp.h (num_xmm_registers): Delete.
6670 * inferiors.c (add_thread): Don't install the thread's regcache
6672 * proc-service.c (gregset_info): Fetch the current inferior's
6673 regs_info. Adjust to use it.
6674 * regcache.c: Include tdesc.h.
6675 (register_bytes, reg_defs, num_registers)
6676 (gdbserver_expedite_regs): Delete.
6677 (get_thread_regcache): If the thread doesn't have a regcache yet,
6678 create one, instead of aborting gdbserver.
6679 (regcache_invalidate_one): Rename to ...
6680 (regcache_invalidate_thread): ... this.
6681 (regcache_invalidate_one): New.
6682 (regcache_invalidate): Only invalidate registers of the current
6684 (init_register_cache): Add target_desc parameter, and use it.
6685 (new_register_cache): Ditto. Assert the target description has a
6686 non zero registers_size.
6687 (regcache_cpy): Add assertions. Adjust.
6688 (realloc_register_cache, set_register_cache): Delete.
6689 (registers_to_string, registers_from_string): Adjust.
6690 (find_register_by_name, find_regno, find_register_by_number)
6691 (register_cache_size): Add target_desc parameter, and use it.
6692 (free_register_cache_thread, free_register_cache_thread_one)
6693 (regcache_release, register_cache_size): New.
6694 (register_size): Add target_desc parameter, and use it.
6695 (register_data, supply_register, supply_register_zeroed)
6696 (supply_regblock, supply_register_by_name, collect_register)
6697 (collect_register_as_string, collect_register_by_name): Adjust.
6698 * regcache.h (struct target_desc): Forward declare.
6699 (struct regcache) <tdesc>: New field.
6700 (init_register_cache, new_register_cache): Add target_desc
6702 (regcache_invalidate_thread): Declare.
6703 (regcache_invalidate_one): Delete declaration.
6704 (regcache_release): Declare.
6705 (find_register_by_number, register_cache_size, register_size)
6706 (find_regno): Add target_desc parameter.
6707 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6709 * remote-utils.c: Include tdesc.h.
6710 (outreg, prepare_resume_reply): Adjust.
6711 * server.c: Include tdesc.h.
6712 (gdbserver_xmltarget): Delete declaration.
6713 (get_features_xml, process_serial_event): Adjust.
6714 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6716 (struct process_info) <tdesc>: New field.
6717 (ipa_tdesc): Declare.
6718 * tdesc.c: New file.
6719 * tdesc.h: New file.
6720 * tracepoint.c: Include tdesc.h.
6721 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6722 (get_context_regcache): Adjust to pass ipa_tdesc down.
6723 (do_action_at_tracepoint): Adjust to get the register cache size
6724 from the context regcache's description.
6725 (traceframe_walk_blocks): Adjust to get the register cache size
6726 from the current trace frame's description.
6727 (traceframe_get_pc): Adjust to get current trace frame's
6728 description and pass it down.
6729 (gdb_collect): Adjust to get the register cache size from the
6731 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6732 (gdbserver_xmltarget): Delete.
6733 (initialize_low_tracepoint): Set the ipa's target description.
6734 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6735 (initialize_low_tracepoint): Set the ipa's target description.
6736 * linux-x86-low.c: Include tdesc.h.
6737 [__x86_64__] (is_64bit_tdesc): New.
6738 (ps_get_thread_area, x86_get_thread_area): Use it.
6739 (i386_cannot_store_register): Rename to ...
6740 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6741 (i386_cannot_fetch_register): Rename to ...
6742 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6743 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6745 (target_regsets): Rename to ...
6746 (x86_regsets): ... this.
6747 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6749 (x86_siginfo_fixup): Use is_64bit_tdesc.
6750 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6751 (tdesc_x32_avx_linux, tdesc_x32_linux)
6752 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6754 (x86_linux_update_xmltarget): Delete.
6755 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6756 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6757 (AMD64_LINUX_USER64_CS): New.
6758 (x86_linux_read_description): New, based on
6759 x86_linux_update_xmltarget.
6760 (same_process_callback): New.
6761 (x86_arch_setup_process_callback): New.
6762 (x86_linux_update_xmltarget): New.
6763 (x86_regsets_info): New.
6764 (amd64_linux_regs_info): New.
6765 (i386_linux_usrregs_info): New.
6766 (i386_linux_regs_info): New.
6767 (x86_linux_regs_info): New.
6768 (x86_arch_setup): Reimplement.
6769 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6770 (x86_emit_ops): Ditto.
6771 (the_low_target): Adjust. Install x86_linux_regs_info,
6772 x86_cannot_fetch_register, and x86_cannot_store_register.
6773 (initialize_low_arch): New.
6774 * linux-ia64-low.c (tdesc_ia64): Declare.
6775 (ia64_fetch_register): Adjust.
6776 (ia64_usrregs_info, regs_info): New globals.
6777 (ia64_regs_info): New function.
6778 (the_low_target): Adjust.
6779 (initialize_low_arch): New function.
6780 * linux-sparc-low.c (tdesc_sparc64): Declare.
6781 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6783 (sparc_arch_setup): New function.
6784 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6785 (the_low_target): Adjust.
6786 (initialize_low_arch): New function.
6787 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6788 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6789 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6790 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6791 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6792 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6793 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6794 (tdesc_powerpc_isa205_vsx64l): Declare.
6795 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6796 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6797 (ppc_set_pc, ppc_get_hwcap): Adjust.
6798 (ppc_usrregs_info): Forward declare.
6799 (!__powerpc64__) ppc_regmap_adjusted: New global.
6800 (ppc_arch_setup): Adjust to the current process'es target
6802 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6803 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6804 (ppc_store_evrregset): Adjust.
6805 (target_regsets): Rename to ...
6806 (ppc_regsets): ... this, and make static.
6807 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6808 (ppc_regs_info): New function.
6809 (the_low_target): Adjust.
6810 (initialize_low_arch): New function.
6811 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6812 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6813 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6814 (tdesc_s390x_linux64v2): Declare.
6815 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6816 (s390_fill_gregset, s390_store_last_break): Adjust.
6817 (target_regsets): Rename to ...
6818 (s390_regsets): ... this, and make static.
6819 (s390_get_pc, s390_set_pc): Adjust.
6820 (s390_get_hwcap): New target_desc parameter, and use it.
6821 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6822 (s390_arch_setup): Adjust to set the current process'es target
6823 description. Don't adjust the regmap.
6824 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6825 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6826 (regs_info_3264): New globals.
6827 (s390_regs_info): New function.
6828 (the_low_target): Adjust.
6829 (initialize_low_arch): New function.
6830 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6831 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6832 [__mips64] (init_registers_mips_linux)
6833 (init_registers_mips_dsp_linux): Delete defines.
6834 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6835 (have_dsp): New global.
6836 (mips_read_description): New, based on mips_arch_setup.
6837 (mips_arch_setup): Reimplement.
6838 (get_usrregs_info): New function.
6839 (mips_cannot_fetch_register, mips_cannot_store_register)
6840 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6841 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6842 (target_regsets): Rename to ...
6843 (mips_regsets): ... this, and make static.
6844 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6845 (dsp_regs_info, regs_info): New globals.
6846 (mips_regs_info): New function.
6847 (the_low_target): Adjust.
6848 (initialize_low_arch): New function.
6849 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6850 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6852 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6853 (arm_read_description): New, with bits factored from
6855 (arm_arch_setup): Reimplement.
6856 (target_regsets): Rename to ...
6857 (arm_regsets): ... this, and make static.
6858 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6859 (arm_regs_info): New function.
6860 (the_low_target): Adjust.
6861 (initialize_low_arch): New function.
6862 * linux-m68k-low.c (tdesc_m68k): Declare.
6863 (target_regsets): Rename to ...
6864 (m68k_regsets): ... this, and make static.
6865 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6866 (m68k_regs_info): New function.
6867 (m68k_arch_setup): New function.
6868 (the_low_target): Adjust.
6869 (initialize_low_arch): New function.
6870 * linux-sh-low.c (tdesc_sharch): Declare.
6871 (target_regsets): Rename to ...
6872 (sh_regsets): ... this, and make static.
6873 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6874 (sh_regs_info, sh_arch_setup): New functions.
6875 (the_low_target): Adjust.
6876 (initialize_low_arch): New function.
6877 * linux-bfin-low.c (tdesc_bfin): Declare.
6878 (bfin_arch_setup): New function.
6879 (bfin_usrregs_info, regs_info): New globals.
6880 (bfin_regs_info): New function.
6881 (the_low_target): Adjust.
6882 (initialize_low_arch): New function.
6883 * linux-cris-low.c (tdesc_cris): Declare.
6884 (cris_arch_setup): New function.
6885 (cris_usrregs_info, regs_info): New globals.
6886 (cris_regs_info): New function.
6887 (the_low_target): Adjust.
6888 (initialize_low_arch): New function.
6889 * linux-cris-low.c (tdesc_crisv32): Declare.
6890 (cris_arch_setup): New function.
6891 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6892 (cris_regs_info): New function.
6893 (the_low_target): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-m32r-low.c (tdesc_m32r): Declare.
6896 (m32r_arch_setup): New function.
6897 (m32r_usrregs_info, regs_info): New globals.
6898 (m32r_regs_info): Adjust.
6899 (initialize_low_arch): New function.
6900 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6901 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6902 (tic6x_usrregs_info): Forward declare.
6903 (tic6x_read_description): New function, based on ...
6904 (tic6x_arch_setup): ... this. Reimplement.
6905 (target_regsets): Rename to ...
6906 (tic6x_regsets): ... this, and make static.
6907 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6908 (tic6x_regs_info): New function.
6909 (the_low_target): Adjust.
6910 (initialize_low_arch): New function.
6911 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6912 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6913 (target_regsets): Rename to ...
6914 (xtensa_regsets): ... this, and make static.
6915 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6917 (xtensa_arch_setup, xtensa_regs_info): New functions.
6918 (the_low_target): Adjust.
6919 (initialize_low_arch): New function.
6920 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6921 (nios2_arch_setup): Set the current process'es tdesc.
6922 (target_regsets): Rename to ...
6923 (nios2_regsets): ... this.
6924 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6925 (nios2_regs_info): New function.
6926 (the_low_target): Adjust.
6927 (initialize_low_arch): New function.
6928 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6929 (aarch64_arch_setup): Set the current process'es tdesc.
6930 (target_regsets): Rename to ...
6931 (aarch64_regsets): ... this.
6932 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6933 (aarch64_regs_info): New function.
6934 (the_low_target): Adjust.
6935 (initialize_low_arch): New function.
6936 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6938 (target_regsets): Rename to ...
6939 (tile_regsets): ... this.
6940 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6941 (tile_regs_info): New function.
6942 (tile_arch_setup): Set the current process'es tdesc.
6943 (the_low_target): Adjust.
6944 (initialize_low_arch): New function.
6945 * spu-low.c (tdesc_spu): Declare.
6946 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6947 * win32-arm-low.c (tdesc_arm): Declare.
6948 (arm_arch_setup): New function.
6949 (the_low_target): Install arm_arch_setup instead of
6951 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6952 (init_windows_x86): Rename to ...
6953 (i386_arch_setup): ... this. Set `win32_tdesc'.
6954 (the_low_target): Adjust.
6955 * win32-low.c (win32_tdesc): New global.
6956 (child_add_thread): Don't create the thread cache here.
6957 (do_initial_child_stuff): Set the new process'es tdesc.
6958 * win32-low.h (struct target_desc): Forward declare.
6959 (win32_tdesc): Declare.
6960 * lynx-i386-low.c (tdesc_i386): Declare global.
6961 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6962 * lynx-low.c (lynx_tdesc): New global.
6963 (lynx_add_process): Set the new process'es tdesc.
6964 * lynx-low.h (struct target_desc): Forward declare.
6965 (lynx_tdesc): Declare global.
6966 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6967 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6968 * nto-low.c (nto_tdesc): New global.
6969 (do_attach): Set the new process'es tdesc.
6970 * nto-low.h (struct target_desc): Forward declare.
6971 (nto_tdesc): Declare.
6972 * nto-x86-low.c (tdesc_i386): Declare.
6973 (nto_x86_arch_setup): Set `nto_tdesc'.
6975 2013-06-04 Gary Benson <gbenson@redhat.com>
6977 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6978 to qSupported response when appropriate.
6979 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6980 with nonzero-length annex.
6981 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6982 arguments supplied in annex.
6984 2013-05-31 Doug Evans <dje@google.com>
6987 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6988 64 bits in 64-cross-32 environment.
6990 2013-05-28 Pedro Alves <palves@redhat.com>
6992 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6993 (aarch64-without-fpu.c): Delete rule.
6994 * configure.srv (aarch64*-*-linux*): Remove references to
6995 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6996 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6999 2013-05-24 Pedro Alves <palves@redhat.com>
7001 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7002 instead of strchr/decode_address. Error if the range isn't split
7003 with a ','. Don't assume there's be a ':' in the action.
7005 2013-05-23 Yao Qi <yao@codesourcery.com>
7006 Pedro Alves <palves@redhat.com>
7008 * linux-low.c (lwp_in_step_range): New function.
7009 (linux_wait_1): If the thread was range stepping and stopped
7010 outside the stepping range, report the stop to GDB. Otherwise,
7011 continue stepping. Add range stepping debug output.
7012 (linux_set_resume_request): Copy the step range from the resume
7014 (linux_supports_range_stepping): New.
7015 (linux_target_ops) <supports_range_stepping>: Set to
7016 linux_supports_range_stepping.
7017 * linux-low.h (struct linux_target_ops)
7018 <supports_range_stepping>: New field.
7019 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7020 * linux-x86-low.c (x86_supports_range_stepping): New.
7021 (the_low_target) <supports_range_stepping>: Set to
7022 x86_supports_range_stepping.
7023 * server.c (handle_v_cont): Handle 'r' action.
7024 (handle_v_requests): Append ";r" if the target supports range
7026 * target.h (struct thread_resume) <step_range_start,
7027 step_range_end>: New fields.
7028 (struct target_ops) <supports_range_stepping>:
7030 (target_supports_range_stepping): New macro.
7032 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7034 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7035 confusion in comment.
7037 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7039 * lynx-low.c (struct process_info_private): New type.
7040 (lynx_add_process): New function.
7041 (lynx_create_inferior, lynx_attach): Replace calls to
7042 add_process by calls to lynx_add_process.
7043 (lynx_resume): If PTID is null, then try using
7044 current_process()->private->last_wait_event_ptid.
7046 (lynx_clear_inferiors): Delete. The contents of that function
7047 has been inlined in lynx_mourn;
7048 (lynx_wait_1): Save the ptid in the process's private data.
7049 (lynx_mourn): Free the process' private data. Replace call
7050 to lynx_clear_inferiors by call to clear_inferiors.
7052 2013-05-17 Yao Qi <yao@codesourcery.com>
7054 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7057 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7059 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7060 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7061 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7062 PT_TEXT_END_ADDR guards. Update comments.
7063 (linux_target_op) <read_offsets>: Conditionally define to
7064 linux_read_offsets if the target is UCLIBC and if it defines
7065 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7067 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7068 Andrew Jenner <andrew@codesourcery.com>
7070 * Makefile.in (SFILES): Add linux-nios2-low.c.
7071 (clean): Add action to delete nios2-linux.c.
7072 (nios2-linux.c): New rule.
7073 * configure.srv: Add nios2*-*-linux*.
7074 * linux-nios2-low.c: New.
7076 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7078 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7080 2013-04-25 Hui Zhu <hui@codesourcery.com>
7083 * ax.c (ax_printf): Add fflush.
7085 2013-04-22 Tom Tromey <tromey@redhat.com>
7087 * Makefile.in (SFILES): Add filestuff.c.
7088 (OBS): Add filestuff.o.
7089 (filestuff.o): New target.
7090 * config.in, configure: Rebuild.
7091 * configure.ac: Check for fdwalk, pipe2.
7093 2013-04-17 Pedro Alves <palves@redhat.com>
7095 * configure.ac (USE_THREAD_DB): Delete variable.
7096 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7097 Don't AC_SUBST USE_THREAD_DB.
7098 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7099 * config.in, configure: Regenerate.
7101 2013-04-16 Pedro Alves <palves@redhat.com>
7103 * linux-low.h (struct lwp_info) <thread_known>: Move under
7104 the USE_THREAD_DB #ifdef.
7106 2013-04-16 Pedro Alves <palves@redhat.com>
7108 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7109 (linux-low.o): Delete rule.
7110 * linux-low.h: Always include "gdb_thread_db.h" instead of
7111 conditionally including thread_db.h.
7112 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7115 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7117 * Makefile.in (install-only): Fix make install regression.
7119 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7121 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7122 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7124 * gdbserver.1: Remove.
7126 2013-03-22 Pedro Alves <palves@redhat.com>
7128 * linux-low.c (handle_extended_wait): Don't call
7129 linux_enable_event_reporting.
7131 2013-03-15 Tony Theodore <tonyt@logyst.com>
7134 * Makefile.in (SHELL): Use @SHELL@.
7136 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7138 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7141 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7143 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7144 Remove extraneous NULL element.
7146 2013-03-13 Yao Qi <yao@codesourcery.com>
7148 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7149 'V' block in trace frame.
7151 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7153 * target.h (struct target_ops): Add btrace ops.
7154 (target_supports_btrace): New macro.
7155 (target_enable_btrace): New macro.
7156 (target_disable_btrace): New macro.
7157 (target_read_btrace): New macro.
7158 * gdbthread.h (struct thread_info): Add btrace field.
7159 * server.c: Include btrace-common.h.
7160 (handle_btrace_general_set): New function.
7161 (handle_btrace_enable): New function.
7162 (handle_btrace_disable): New function.
7163 (handle_general_set): Call handle_btrace_general_set.
7164 (handle_qxfer_btrace): New function.
7165 (struct qxfer qxfer_packets[]): Add btrace entry.
7166 * inferiors.c (remove_thread): Disable btrace.
7167 * linux-low: Include linux-btrace.h.
7168 (linux_low_enable_btrace): New function.
7169 (linux_low_read_btrace): New function.
7170 (linux_target_ops): Add btrace ops.
7171 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7172 Add srv_linux_btrace=yes.
7173 (x86_64-*-linux*): Add linux-btrace.o.
7174 Add srv_linux_btrace=yes.
7175 * configure.ac: Define HAVE_LINUX_BTRACE.
7176 * config.in: Regenerated.
7177 * configure: Regenerated.
7179 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7181 * server.c (handle_qxfer): Preserve error message if -3 is
7183 (qxfer): Document the -3 return value.
7185 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7187 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7188 (linux_btrace_h): New variable.
7189 (linux-btrace.o): New rule.
7191 2013-03-08 Stan Shebs <stan@codesourcery.com>
7192 Hafiz Abid Qadeer <abidh@codesourcery.com>
7194 * tracepoint.c (trace_buffer_size): New global.
7195 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7196 (init_trace_buffer): Change to one-argument function. Allocate
7197 trace buffer memory.
7198 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7199 handle QTBuffer:size packet.
7200 (cmd_bigqtbuffer_size): New function.
7201 (initialize_tracepoint): Call init_trace_buffer with
7202 DEFAULT_TRACE_BUFFER_SIZE.
7203 * server.c (handle_query): Add QTBuffer:size in the
7206 2013-03-07 Yao Qi <yao@codesourcery.com>
7208 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7209 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7211 (cmd_qtsp): Adjust condition. Do post increment.
7212 Set cur_action and cur_step_action back to 0.
7214 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7217 * linux-low.c (linux_write_memory): Return early success if LEN is
7220 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7222 * configure.srv: Add x86_64-*-cygwin* as target.
7224 2013-02-28 Tom Tromey <tromey@redhat.com>
7226 * configure.ac: Invoke AC_SYS_LARGEFILE.
7227 * configure, config.in: Rebuild.
7229 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7231 * win32-low.c: Throughout, fix format strings and casts of
7232 printf-like functions to avoid type related warnings on all
7234 (get_child_debug_event): Print dwDebugEventCode as hex since
7235 that's how it's usually documented.
7237 2013-02-28 Yao Qi <yao@codesourcery.com>
7239 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7242 2013-02-27 Jiong Wang <jiwang@tilera.com>
7244 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7245 (reg-tilegx32.c): New rule.
7246 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7247 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7248 different register info initializer according to elf class.
7249 (init_registers_tilgx32): New function. The tilegx32 register info
7251 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7252 (tile_store_gregset): Likewise.
7254 2013-02-27 Yao Qi <yao@codesourcery.com>
7256 * server.c (process_point_options): Print debug message when
7257 debug_threads is true.
7259 2013-02-26 Yao Qi <yao@codesourcery.com>
7261 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7263 2013-02-19 Pedro Alves <palves@redhat.com>
7264 Kai Tietz <ktietz@redhat.com>
7268 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7269 instead of strtoul to extract address from packet.
7270 (process_serial_event) <'z'>: Likewise.
7272 2013-02-18 Yao Qi <yao@codesourcery.com>
7274 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7276 2013-02-14 Pedro Alves <palves@redhat.com>
7280 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7281 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7283 2013-02-14 Pedro Alves <palves@redhat.com>
7285 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7287 2013-02-14 Pedro Alves <palves@redhat.com>
7289 * tracepoint.c (save_string): Delete.
7290 (add_tracepoint_action): Use savestring instead of save_string.
7292 2013-02-12 Pedro Alves <palves@redhat.com>
7294 * linux-xtensa-low.c: Ditto.
7295 * xtensa-xtregs.c: Ditto.
7297 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7299 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7302 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7304 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7305 aarch64_num_wp_regs and aarch64_num_bp_regs to
7306 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7308 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7310 * linux-aarch64-low.c (ps_get_thread_area): Replace
7311 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7313 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7314 Marcus Shawcroft <marcus.shawcroft@arm.com>
7315 Nigel Stephens <nigel.stephens@arm.com>
7316 Yufeng Zhang <yufeng.zhang@arm.com>
7318 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7319 (aarch64.c, aarch64-without-fpu.c): New targets.
7320 * configure.srv (aarch64*-*-linux*): New.
7321 * linux-aarch64-low.c: New file.
7323 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7325 * linux-low.c (handle_extended_wait, linux_create_inferior)
7326 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7327 (dequeue_one_deferred_signal, linux_resume_one_thread)
7328 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7329 (linux_tracefork_grandchild, linux_test_for_tracefork)
7330 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7331 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7332 where the argument is 0.
7334 2013-01-25 Yao Qi <yao@codesourcery.com>
7336 * event-loop.c: Include "queue.h".
7337 (gdb_event_p): New typedef.
7338 (struct gdb_event) <next_event>: Remove.
7339 (event_queue): Change to QUEUE(gdb_event_p).
7340 (async_queue_event): Remove.
7341 (gdb_event_xfree): New.
7342 (initialize_event_loop): New.
7343 (process_event): Use API from QUEUE.
7344 (wait_for_event): Likewise.
7345 * server.c (main): Call initialize_event_loop.
7346 * server.h (initialize_event_loop): Declare.
7348 2013-01-18 Yao Qi <yao@codesourcery.com>
7350 * ax.h (struct eval_agent_expr_context): New.
7351 (gdb_eval_agent_expr): Update declaration.
7352 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7353 TFRAME. Add new argument CTX.
7354 * server.h (struct eval_agent_expr_context): Declare.
7355 (agent_mem_read, agent_tsv_read): Update declaration.
7356 (agent_mem_read_string): Likewise.
7357 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7358 (add_traceframe_block): Add new argument TPOINT.
7359 Increase TPOINT->traceframe_usage.
7360 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7361 eval_tracepoint_agent_expr.
7362 (condition_true_at_tracepoint): Likewise.
7363 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7364 (agent_mem_read_string, agent_tsv_read): Likewise.
7366 2013-01-16 Yao Qi <yao@codesourcery.com>
7368 * linux-low.c (linux_resume_one_lwp): Don't check
7369 'lwp->bp_reinsert != 0'.
7371 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7372 Pedro Alves <palves@redhat.com>
7374 * lynx-low.c (ptrace_request_to_str): Define a temporary
7375 macro and use it to simplify this function's implementation.
7377 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7379 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7382 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7384 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7386 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7388 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7390 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7392 * lynx-low.c (lynx_resume): Use the resume_info parameter
7393 to determine the ptid for the lynx_ptrace call, unless
7394 it is equal to minus_one_ptid, in which case we use the
7395 ptid of the current_inferior.
7396 (lynx_wait_1): After having received a thread create/exit
7397 event, resume the inferior's execution using the signaling
7398 thread's ptid, rather than the old ptid.
7400 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7402 * lynx-low.c (lynx_resume): Delete variable ret.
7404 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7406 * gdbreplay.c (gdbreplay_version): Update copyright year.
7407 * server.c (gdbserver_version): Likewise.
7409 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7411 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7414 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7416 * lynx-low.c (ptrace_request_to_str): Add handling for
7419 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7421 * lynx-low.c (lynx_attach): Delete variable new_process.
7423 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7425 * lynx-low.c (lynx_create_inferior): Delete variable
7428 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7430 * lynx-low.c (ptrace_request_to_str): Do not handle
7431 PTRACE_GETTHREADLIST if this macro does not exist.
7433 2012-12-15 Yao Qi <yao@codesourcery.com>
7435 * Makefile.in (OBS): Add notif.o.
7436 * notif.c, notif.h: New.
7437 * server.c: Include "notif.h".
7438 (struct vstop_notif) <next>: Remove.
7440 (queue_stop_reply): Update.
7441 (push_event, send_next_stop_reply): Remove.
7442 (discard_queued_stop_replies): Update.
7443 (notif_stop): New variable.
7444 (handle_v_stopped): Remove.
7445 (handle_v_requests): Don't call handle_v_stopped. Call
7446 handle_ack_notif instead.
7447 (queue_stop_reply_callback): Call notif_event_enque instead
7448 of queue_stop_reply.
7449 (handle_status): Don't call send_next_stop_reply, call
7450 notif_write_event instead.
7451 (kill_inferior_callback): Likewise.
7452 (detach_or_kill_inferior_callback): Likewise.
7453 (main): Call initialize_notif.
7454 (process_serial_event): Call QUEUE_is_empty.
7455 (handle_target_event): Call notif_push instead of push event.
7456 * server.h (push_event): Remove declaration.
7458 2012-12-10 Tom Tromey <tromey@redhat.com>
7460 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7461 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7464 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7465 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7466 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7467 (amd64-linux-ipa.o, ax.o): Rewrite.
7468 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7469 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7470 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7471 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7472 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7473 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7474 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7475 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7476 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7477 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7478 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7479 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7480 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7481 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7482 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7483 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7484 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7485 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7486 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7487 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7488 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7489 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7490 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7491 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7492 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7493 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7494 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7495 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7496 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7497 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7498 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7499 (reg-tilegx.o): Remove.
7500 (all_object_files): New macro.
7501 Include .deps files.
7502 * aclocal.m4, configure: Rebuild.
7503 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7504 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7505 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7507 2012-12-05 Tom Tromey <tromey@redhat.com>
7510 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7512 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7514 * configure.ac: Check for linux/perf_event.h.
7515 * config.in: Regenerated.
7516 * configure: Regenerated.
7518 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7520 * hostio.c (handle_readlink): Decrease buffer size
7521 parameter passed to readlink by one byte.
7523 2012-11-26 Yao Qi <yao@codesourcery.com>
7525 * configure.ac (build_warnings): Append '-Wempty-body'.
7526 * configure: Regenerated.
7527 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7530 2012-11-15 Pierre Muller <muller@sourceware.org>
7532 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7533 * config.in: Regenerate.
7534 * configure: Regenerate.
7535 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7536 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7537 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7538 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7540 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7541 instead of <sys/wait.h> header.
7542 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7544 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7546 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7547 (various make rules): Remove -DGDBSERVER
7549 2012-11-09 Yao Qi <yao@codesourcery.com>
7551 * spu-low.c (current_ptid): Move it to ..
7552 * gdbthread.h: ... here. New.
7553 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7554 * server.c (myresume, process_serial_event): Likewise.
7555 * thread-db.c (thread_db_find_new_threads): Likewise.
7556 * tracepoint.c (run_inferior_command): Likewise.
7558 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7560 * server.c (handle_search_memory_1): Include access length in
7563 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7565 * linux-crisv32-low.c: Fix compile errors.
7567 2012-09-04 Yao Qi <yao@codesourcery.com>
7569 * tracepoint.c (cmd_qtsv): Adjust debug message.
7570 Don't check CUR_TPOINT.
7572 2012-08-28 Yao Qi <yao@codesourcery.com>
7574 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7575 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7576 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7577 Remove declarations of xmalloc, xreallloc, xstrdup and
7579 * Makefile.in (libiberty_h): New.
7580 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7581 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7583 2012-08-23 Yao Qi <yao@codesourcery.com>
7585 * server.h: Remove declaration of 'xsnprintf'.
7587 2012-08-22 Keith Seitz <keiths@redhat.com>
7589 * server.h: Include build-gnulib-gbserver/config.h.
7590 * gdbreplay.c: Likewise.
7592 2012-08-08 Doug Evans <dje@google.com>
7594 * Makefile.in (SFILES): Add gdb_vecs.c.
7595 (OBS): Add gdb_vecs.o.
7596 (gdb_vecs_h, host_defs_h): New variables.
7597 (thread-db.o): Add $(gdb_vecs_h) dependency.
7598 (gdb_vecs.o): New rule.
7599 * thread-db.c: #include "gdb_vecs.h".
7600 (thread_db_load_search): Use a vector to iterate over path elements.
7601 Handle text appearing after "$pdir".
7603 * configure.ac: Add check for strstr.
7604 * config.in: Regenerate.
7605 * configure: Regenerate.
7607 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7609 * hostio.c (handle_pread): If pread fails, fall back to attempting
7611 (handle_pwrite): Likewise for pwrite.
7613 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7615 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7616 between unsupported TYPE and unimplementable ADDR/LEN combination.
7617 (arm_insert_point): Act on new return value.
7619 2012-07-31 Pedro Alves <palves@redhat.com>
7621 * server.c (process_point_options): Only skip tokens if we find
7622 one that is unrecognized. Don't treat 'X' specially while
7623 skipping unrecognized tokens.
7625 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7627 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7628 to 4-byte-align HW breakpoint addresses for Thumb.
7630 2012-07-27 Yao Qi <yao@codesourcery.com>
7634 * server.h: Declare gdb_agent_about_to_close.
7635 * target.c (kill_inferior): Include "agent.h".
7636 New. Send command 'kill'.
7637 * target.h (kill_inferior): Removed macro.
7638 * tracepoint.c (gdb_agent_about_to_close): New.
7639 (gdb_agent_helper_thread): Handle command 'close'.
7640 Wait endlessly until the inferior stops.
7641 Install gdb_agent_remove_socket to atexit hook.
7642 (agent_socket_name): New static variable.
7643 (gdb_agent_socket_init): Replace local variable 'name' with
7644 'agent_socket_name'.
7645 (gdb_agent_remove_socket): New.
7647 2012-07-27 Yao Qi <yao@codesourcery.com>
7649 * server.c (process_point_options): Stop at 'X' when parsing.
7651 2012-07-19 Michael Eager <eager@eagercon.com>
7653 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7655 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7656 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7657 hardware breakpoint.
7659 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7661 * gdbserver/linux-low.c (initialize_low): Call
7662 linux_ptrace_init_warnings.
7664 2012-07-02 Doug Evans <dje@google.com>
7666 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7669 2012-07-02 Stan Shebs <stan@codesourcery.com>
7671 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7672 (ax.o): Add it to build rule.
7674 (OBS): Add format.o.
7675 (IPA_OBS): Add format.o.
7676 * server.c (handle_query): Claim support for breakpoint commands.
7677 (process_point_options): Add command case.
7678 (process_serial_event): Leave running if there are printfs in
7680 * mem-break.h (any_persistent_commands): Declare.
7681 (add_breakpoint_commands): Declare.
7682 (gdb_no_commands_at_breakpoint): Declare.
7683 (run_breakpoint_commands): Declare.
7684 * mem-break.c (struct point_command_list): New struct.
7685 (struct breakpoint): New field command_list.
7686 (any_persistent_commands): New function.
7687 (add_commands_to_breakpoint): New function.
7688 (add_breakpoint_commands): New function.
7689 (gdb_no_commands_at_breakpoint): New function.
7690 (run_breakpoint_commands): New function.
7691 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7693 * ax.c: Include format.h.
7694 (ax_printf): New function.
7695 (gdb_eval_agent_expr): Add printf opcode.
7697 2012-06-13 Yao Qi <yao@codesourcery.com>
7699 * server.c (start_inferior): Remove duplicated writes to fields
7700 'last_resume_kind' and 'last_status' of 'current_inferior'.
7702 2012-06-12 Yao Qi <yao@codesourcery.com>
7703 Pedro Alves <palves@redhat.com>
7705 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7707 * server.c (handle_v_cont): Extend comment.
7709 2012-06-11 Yao Qi <yao@codesourcery.com>
7711 * linux-low.c (linux_attach): Add 'static'.
7713 2012-06-06 Yao Qi <yao@codesourcery.com>
7715 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7717 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7719 Fix gcc -flto compilation warning.
7720 * server.c (main): Make variable multi_mode and attach volatile.
7722 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7724 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7725 if the platform doesn't know about it.
7727 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7729 * Makefile.in (SFILES): Add linux-tile-low.c.
7730 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7731 * configure.srv: Handle tilegx-*-linux*.
7732 * linux-tile-low.c: New file.
7734 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7736 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7738 2012-05-24 Pedro Alves <palves@redhat.com>
7742 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7744 2012-05-24 Pedro Alves <palves@redhat.com>
7748 Replace target_signal with gdb_signal throughout.
7750 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7752 * linux-low.c (linux_store_registers): Avoid the copying sequence
7753 when no data has been retrieved by ptrace.
7755 2012-05-22 Will Deacon <will.deacon@arm.com>
7757 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7758 Include asm/ptrace.h.
7759 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7762 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7764 * linux-low.c (linux_store_registers): Don't re-retrieve data
7765 with ptrace that has already been obtained from /proc. Always
7766 copy any data retrieved with ptrace to the buffer supplied.
7768 2012-05-11 Yao Qi <yao@codesourcery.com>
7769 Pedro Alves <palves@redhat.com>
7771 * linux-low.c (enum stopping_threads_kind): New.
7772 (stopping_threads): Change type to `enum stopping_threads_kind'.
7773 (handle_extended_wait): If stopping and suspending threads, leave
7774 the new_lwp suspended too.
7775 (linux_wait_for_event): Adjust.
7776 (stop_all_lwps): Set `stopping_threads' to
7777 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7778 whether we're suspending threads or just stopping them. Assert no
7781 2012-04-29 Yao Qi <yao@codesourcery.com>
7783 * server.h: Move some code to ...
7784 * gdbthread.h: ... here. New.
7785 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7786 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7787 (nto-low.o, win32-low.o): Likewise.
7788 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7789 * regcache.c, remote-utils.c, server.c: Likewise.
7790 * target.c, tracepoint.c, win32-low.c: Likewise.
7792 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7794 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7795 (PTRACE_ARG4_TYPE): Likewise.
7796 (PTRACE_XFER_TYPE): Likewise.
7797 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7798 ptrace to PTRACE_ARG3_TYPE.
7799 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7800 (PTRACE_ARG4_TYPE): Likewise.
7801 (PTRACE_XFER_TYPE): Likewise.
7802 (linux_detach_one_lwp): Cast fourth argument of
7803 ptrace to long then PTRACE_ARG4_TYPE.
7804 (regsets_fetch_inferior_registers): Cast third argument of
7805 ptrace to long then PTRACE_ARG3_TYPE.
7806 (regsets_store_inferior_registers): Likewise.
7808 2012-04-20 Pedro Alves <palves@redhat.com>
7810 * configure: Regenerate.
7812 2012-04-19 Pedro Alves <palves@redhat.com>
7814 * Makefile.in (GNULIB_BUILDDIR): New.
7815 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7816 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7817 (all, install-only, uninstall, clean-info, all-lib, clean): No
7818 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7819 (maintainer-clean realclean distclean): Use subdir_do.
7821 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7822 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7823 * acinclude.m4: Include acx_configure_dir.m4.
7824 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7825 calls. Call AC_PROG_RANLIB. Configure gnulib using
7828 (GNULIB_STDINT_H): Adjust.
7829 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7830 * gdbreplay.c: Include build-gnulib/config.h.
7831 * server.h: Likewise.
7832 * aclocal.m4: Regenerate.
7833 * config.in: Regenerate.
7834 * configure: Regenerate.
7836 2012-04-19 Pedro Alves <palves@redhat.com>
7838 * Makefile.in (LIBGNU, INCGNU): Adjust.
7839 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7840 (all, install-only, uninstall, clean-info, all-lib, clean)
7841 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7842 * configure.ac: Adjust AC_OUTPUT output.
7843 * aclocal.m4: Regenerate.
7844 * configure: Regenerate.
7846 2012-04-19 Pedro Alves <palves@redhat.com>
7848 * Makefile.in (generated_files): New.
7849 (server_h): Remove the explicit dependency on config.h, and depend
7850 on $generated_files.
7852 2012-04-19 Pedro Alves <palves@redhat.com>
7854 * Makefile.in (INCGNU): Add -Ignulib.
7856 2012-04-19 Pedro Alves <palves@redhat.com>
7858 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7859 (INCGNU): ... this, and spell out -I here.
7860 (GNULIB_LIB): Rename to ...
7862 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7864 2012-04-19 Pedro Alves <palves@redhat.com>
7866 * config.in: Regenerate.
7868 2012-04-19 Pedro Alves <palves@redhat.com>
7870 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7871 * server.h (memmem): Remove declaration.
7872 * config.in: Regenerate.
7873 * configure: Regenerate.
7875 2012-04-19 Yao Qi <yao@codesourcery.com>
7877 * Makefile.in (SFILES): Add common/vec.c.
7881 2012-04-19 Yao Qi <yao@codesourcery.com>
7883 * remote-utils.c (prepare_resume_reply): Replace with macro
7884 target_core_of_thread.
7885 * server.c (handle_qxfer_threads_proper): Likewise.
7886 * target.h (traget_core_of_thread): New macro.
7888 2012-04-18 Pedro Alves <palves@redhat.com>
7890 * aclocal.m4: Regenerate.
7891 * configure: Regenerate.
7893 2012-04-16 Yao Qi <yao@codesourcery.com>
7895 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7896 duplicated on address.
7898 2012-04-16 Yao Qi <yao@codesourcery.com>
7900 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7901 (struct tracepoint_action_ops) <send>: New field.
7902 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7903 (agent_expr_send, x_tracepoint_action_send): New.
7904 (l_tracepoint_action_send): New.
7905 (cmd_qtdp): Download and install tracepoint
7906 according to `use_agent'.
7907 (run_inferior_command): Add one more parameter `len'.
7909 (tracepoint_send_agent): New.
7910 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7912 2012-04-16 Yao Qi <yao@codesourcery.com>
7914 * tracepoint.c (download_tracepoints): Moved to ...
7915 (cmd_qtstart): ... here.
7917 2012-04-14 Yao Qi <yao@codesourcery.com>
7919 * tracepoint.c: Include inttypes.h.
7920 (struct collect_memory_action): Use sized types.
7921 (struct tracepoint): Likewise.
7922 (cmd_qtdp, stop_tracing): Update print specifiers.
7923 (cmd_qtp, response_tracepoint): Likewise.
7924 (collect_data_at_tracepoint): Likewise.
7925 (collect_data_at_step): Likewise.
7927 2012-04-14 Yao Qi <yao@codesourcery.com>
7929 Import gnulib module inttypes.
7930 * aclocal.m4, config.in, configure: Regenerated.
7932 2012-04-14 Yao Qi <yao@codesourcery.com>
7934 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7935 Makefile and config.status at last.
7937 2012-04-13 Yao Qi <yao@codesourcery.com>
7939 * tracepoint.c: Include stdint.h unconditionally.
7941 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7943 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7944 on BFD_HAVE_SYS_PROCFS_TYPE.
7945 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7946 * configure: Regenerate.
7947 * config.in: Likewise.
7949 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7951 * Makefile.in (clean): Also remove x32.c x32-linux.c
7952 x32-avx.c x32-avx-linux.c.
7953 (x32.o): New target.
7955 (x32-linux.o): Likewise.
7956 (x32-linux.c): Likewise.
7957 (x32-avx.o): Likewise.
7958 (x32-avx.c): Likewise.
7959 (x32-avx-linux.o): Likewise.
7960 (x32-avx-linux.c): Likewise.
7962 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7963 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7964 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7965 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7966 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7967 i386/x32-avx-linux.xml.
7969 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7970 (init_registers_x32_avx_linux): Likwise.
7971 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7972 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7974 2012-04-13 Pedro Alves <palves@redhat.com>
7976 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7977 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7978 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7979 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7982 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7984 * linux-x86-low.c (compat_x32_clock_t): New.
7985 (compat_x32_siginfo_t): Likewise.
7986 (compat_x32_siginfo_from_siginfo): Likewise.
7987 (siginfo_from_compat_x32_siginfo): Likewise.
7988 (linux_is_elf64): Likewise.
7989 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7990 and siginfo_from_compat_x32_siginfo for x32.
7991 (x86_arch_setup): Set linux_is_elf64.
7993 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7996 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7998 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7999 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8000 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8001 compatible with process.
8003 2012-04-12 Yao Qi <yao@codesourcery.com>
8005 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8006 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8007 (install-only, install-info, clean): Handle sub dir gnulib.
8008 (all-lib, am--refresh): New targets.
8009 (memmem.o): Remove target.
8010 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8011 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8012 (AC_REPLACE_FUNCS): Remove memmem.
8013 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8014 (AC_OUTPUT): Generate Makefile in gnulib/.
8015 * aclocal.m4, config.in, configure: Regenerated.
8017 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8019 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8021 2012-04-05 Pedro Alves <palves@redhat.com>
8023 -Werror=strict-aliasing
8025 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8028 2012-04-04 Pedro Alves <palves@redhat.com>
8030 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8031 (sparc_store_gregset_from_stack, sparc_store_gregset)
8032 (sparc_breakpoint_at): Fix formatting.
8034 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8036 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8038 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8039 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8040 * config.in: Regenerate.
8041 * configure: Likewise.
8043 2012-03-29 Pedro Alves <palves@redhat.com>
8045 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8046 Correct ptrace arguments.
8048 2012-03-28 Pedro Alves <palves@redhat.com>
8050 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8051 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8052 (IA64_FR1_REGNUM): New defines.
8053 (ia64_fetch_register): New.
8054 (the_low_target): Install it.
8055 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8057 * linux-low.c (linux_fetch_registers): Try the
8058 the_low_target.fetch_register hook first.
8060 * linux-arm-low.c (the_low_target): Adjust.
8061 * linux-bfin-low.c (the_low_target): Adjust.
8062 * linux-cris-low.c (the_low_target): Adjust.
8063 * linux-crisv32-low.c (the_low_target): Adjust.
8064 * linux-m32r-low.c (the_low_target): Adjust.
8065 * linux-m68k-low.c (the_low_target): Adjust.
8066 * linux-mips-low.c (the_low_target): Adjust.
8067 * linux-ppc-low.c (the_low_target): Adjust.
8068 * linux-s390-low.c (the_low_target): Adjust.
8069 * linux-sh-low.c (the_low_target): Adjust.
8070 * linux-sparc-low.c (the_low_target): Adjust.
8071 * linux-tic6x-low.c (the_low_target): Adjust.
8072 * linux-x86-low.c (the_low_target): Adjust.
8073 * linux-xtensa-low.c (the_low_target): Adjust.
8075 2012-03-26 Pedro Alves <palves@redhat.com>
8077 * server.c (handle_qxfer_libraries): Don't bail early if
8078 the_target->qxfer_libraries_svr4 is not NULL.
8080 2012-03-26 Pedro Alves <palves@redhat.com>
8082 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8084 2012-03-23 Pedro Alves <palves@redhat.com>
8086 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8087 "library-list-svr4" element's start tag when the the DSO list is
8090 2012-03-23 Pedro Alves <palves@redhat.com>
8092 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8093 a variable whose type size is the same as the inferior's pointer
8096 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8098 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8100 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8101 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8102 * linux-low.h: Include <signal.h>.
8103 (struct siginfo): Remove forward declaration.
8104 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8107 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8109 * .gitignore: Ignore more files.
8111 2012-03-19 Pedro Alves <palves@redhat.com>
8112 Jan Kratochvil <jan.kratochvil@redhat.com>
8114 * server.c (cont_thread, general_thread): Add describing comments.
8115 (start_inferior): Clear `cont_thread'.
8116 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8119 2012-03-15 Yao Qi <yao@codesourcery.com>
8121 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8123 (cmd_qtdp): ... here.
8125 2012-03-15 Yao Qi <yao@codesourcery.com>
8127 * tracepoint.c (struct tracepoint_action_ops): New.
8128 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8129 (m_tracepoint_action_download): New.
8130 (r_tracepoint_action_download): New.
8131 (x_tracepoint_action_download): New.
8132 (l_tracepoint_action_download): New.
8133 (add_tracepoint_action): Install `action->ops' according type.
8134 (download_tracepoint_1): Move code `download' function pointer
8135 of various tracepoint_action_ops.
8137 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8139 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8140 linux_ptrace_attach_warnings.
8142 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8144 * Makefile.in (linux-ptrace.o): New.
8145 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8146 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8147 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8148 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8149 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8151 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8153 2012-03-08 Yao Qi <yao@codesourcery.com>
8154 Pedro Alves <palves@redhat.com>
8156 Fix PR server/13392.
8157 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8159 * tracepoint.c (remove_tracepoint): New.
8160 (cmd_qtdp): Call remove_tracepoint when failed to install.
8162 2012-03-07 Pedro Alves <palves@redhat.com>
8164 * linux-low.c (get_detach_signal): New.
8165 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8166 Pass on pending signals to PTRACE_DETACH. Check the result of the
8168 * server.c (program_signals, program_signals_p): New.
8169 (handle_general_set): Handle QProgramSignals.
8170 * server.h (program_signals, program_signals_p): Declare.
8172 2012-03-05 Pedro Alves <palves@redhat.com>
8173 Jan Kratochvil <jan.kratochvil@redhat.com>
8175 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8178 2012-03-03 Yao Qi <yao@codesourcery.com>
8180 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8181 agent_look_up_symbols.
8183 2012-03-03 Yao Qi <yao@codesourcery.com>
8185 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8186 (linux-x86-low.o): Likewise.
8187 * server.h: Remove in_process_agent_loaded.
8188 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8192 2012-03-03 Yao Qi <yao@codesourcery.com>
8194 * tracepoint.c (gdb_agent_capability): New global.
8195 (in_process_agent_loaded_ust): Renamed to
8196 `in_process_agent_supports_ust'.
8198 (in_process_agent_supports_ust): Call agent_capability_check.
8199 (clear_installed_tracepoints): Assert that agent supports
8202 2012-03-03 Yao Qi <yao@codesourcery.com>
8204 * linux-low.c (linux_supports_agent): New.
8205 (linux_target_ops): Initialize field `supports_agent' with
8206 linux_supports_agent.
8207 * target.h (struct target_ops) <supports_agent>: New.
8208 (target_supports_agent): New macro.
8209 * server.c (handle_general_set): Handle packet 'QAgent'.
8210 (handle_query): Send `QAgent+'.
8211 * Makefile.in (server.o): Depends on agent.h.
8213 2012-03-03 Yao Qi <yao@codesourcery.com>
8215 * Makefile.in (OBS): Add agent.o.
8216 Add new rule for agent.o.
8217 Track dependence of tracepoint.c on agent.h.
8218 * tracepoint.c (run_inferior_command_1):
8219 (run_inferior_command): Call agent_run_command.
8220 (gdb_ust_connect_sync_socket): Deleted. Move it to
8222 (resume_thread, stop_thread): Likewise.
8223 (gdb_ust_socket_init): Renamed to ...
8224 (gdb_agent_socket_init): ... New.
8225 (gdb_ust_thread): Renamed to ...
8226 (gdb_agent_helper_thread): ... New.
8227 (gdb_ust_init): Move some code to ...
8228 (gdb_agent_init): ... here. New.
8229 [HAVE_UST]: Call gdb_ust_init.
8230 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8231 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8232 * config.in, configure: Regenerated.
8234 2012-03-02 Pedro Alves <palves@redhat.com>
8236 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8237 * linux-low.c (struct simple_pid_list): New.
8238 (stopped_pids): New a struct simple_pid_list pointer.
8239 (add_to_pid_list, pull_pid_from_list): New.
8240 (handle_extended_wait): Don't assume the first signal new children
8241 report is SIGSTOP. Adjust call to pull_pid_from_list.
8242 (linux_wait_for_lwp): Adjust.
8244 2012-03-02 Yao Qi <yao@codesourcery.com>
8246 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8249 2012-03-02 Yao Qi <yao@codesourcery.com>
8251 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8252 `stop_pc' and `tpoint'. Update caller.
8254 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8256 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8257 * linux-low.c (use_linux_regsets): New macro.
8258 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8259 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8260 (linux_register_in_regsets): New function.
8261 (usr_fetch_inferior_registers): Skip registers covered by
8263 (usr_store_inferior_registers): Likewise.
8264 (usr_fetch_inferior_registers): New macro.
8265 (usr_store_inferior_registers): Likewise.
8266 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8267 (linux_store_registers): Likewise.
8268 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8270 (init_registers_mips64_dsp_linux): Likewise.
8271 (init_registers_mips_linux): New macro.
8272 (init_registers_mips_dsp_linux): Likewise.
8273 (mips_dsp_num_regs): Likewise.
8274 (DSP_BASE, DSP_CONTROL): New fallback macros.
8275 (mips_base_regs): New macro.
8276 (mips_regmap): Use it. Fix the size.
8277 (mips_dsp_regmap): New variable.
8278 (mips_dsp_regset_bitmap): Likewise.
8279 (mips_arch_setup): New function.
8280 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8282 (mips_cannot_store_register): Likewise.
8283 (the_low_target): Update .arch_setup, .num_regs and .regmap
8284 initializers. Add .regset_bitmap initializer.
8285 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8287 * linux-bfin-low.c (the_low_target): Likewise.
8288 * linux-cris-low.c (the_low_target): Likewise.
8289 * linux-crisv32-low.c (the_low_target): Likewise.
8290 * linux-ia64-low.c (the_low_target): Likewise.
8291 * linux-m32r-low.c (the_low_target): Likewise.
8292 * linux-m68k-low.c (the_low_target): Likewise.
8293 * linux-ppc-low.c (the_low_target): Likewise.
8294 * linux-s390-low.c (the_low_target): Likewise.
8295 * linux-sh-low.c (the_low_target): Likewise.
8296 * linux-sparc-low.c (the_low_target): Likewise.
8297 * linux-tic6x-low.c (the_low_target): Likewise.
8298 * linux-x86-low.c (the_low_target): Likewise.
8299 * linux-xtensa-low.c (the_low_target): Likewise.
8300 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8301 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8302 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8304 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8305 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8307 2012-02-29 Yao Qi <yao@codesourcery.com>
8308 Pedro Alves <palves@redhat.com>
8310 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8311 `step_over_finished' is true.
8313 2012-02-27 Pedro Alves <palves@redhat.com>
8315 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8316 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8318 2012-02-27 Pedro Alves <palves@redhat.com>
8321 * linux-low.c (pid_is_stopped): New.
8322 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8324 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8326 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8329 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8331 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8333 2012-02-24 Luis Machado <lgustavo@codesourcery>
8335 * server.c (handle_query): Advertise support for target-side
8336 breakpoint condition evaluation.
8337 (process_point_options): New function.
8338 (process_serial_event): When inserting a breakpoint, check for
8339 a target-side condition that should be evaluated.
8341 * mem-break.c: Include regcache.h and ax.h.
8342 (point_cond_list_t): New data structure.
8343 (breakpoint) <cond_list>: New field.
8344 (find_gdb_breakpoint_at): Make non-static.
8345 (delete_gdb_breakpoint_at): Clear any target-side
8347 (clear_gdb_breakpoint_conditions): New function.
8348 (add_condition_to_breakpoint): Likewise.
8349 (add_breakpoint_condition): Likewise.
8350 (gdb_condition_true_at_breakpoint): Likewise.
8351 (gdb_breakpoint_here): Return result directly instead
8352 of going through a local variable.
8354 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8355 (clear_gdb_breakpoint_conditions): Likewise.
8356 (add_breakpoint_condition): Likewise.
8357 (gdb_condition_true_at_breakpoint): Likewise.
8359 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8360 (need_step_over_p): Take target-side breakpoint condition into
8363 2012-02-24 Luis Machado <lgustavo@codesourcery>
8365 * server.h: Include tracepoint.h.
8366 (agent_mem_read, agent_get_trace_state_variable_value,
8367 agent_set_trace_state_variable_value,
8368 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8369 get_set_tsv_func_addr): New prototypes.
8371 * ax.h: New include file.
8372 * ax.c: New source file.
8374 * tracepoint.c: Include ax.h.
8375 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8376 agent_expr, eval_result_type): Move to ax.h.
8377 (parse_agent_expr): Rename to ...
8378 (gdb_parse_agent_expr): ... this, make it non-static and move
8380 (unparse_agent_expr) Rename to ...
8381 (gdb_unparse_agent_expr): ... this, make it non-static and move
8383 (eval_agent_expr): Rename to ...
8384 (eval_tracepoint_agent_expr): ... this.
8385 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8386 forward declarations.
8387 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8388 (agent_get_trace_state_variable_value): New function.
8389 (agent_set_trace_state_variable_value): New function.
8390 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8391 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8392 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8393 (condition_true_at_tracepoint): Likewise.
8394 (parse_agent_expr): Rename to ...
8395 (gdb_parse_agent_expr): ... this and move to ax.c.
8396 (unparse_agent_expr): Rename to ...
8397 (gdb_unparse_agent_expr): ... this and move to ax.c.
8398 (gdb_agent_op_name): Move to ax.c.
8399 (eval_agent_expr): Rename to ...
8400 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8402 (eval_tracepoint_agent_expr): New function.
8403 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8405 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8407 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8408 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8409 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8410 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8411 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8412 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8413 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8414 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8415 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8416 (compile_bytecodes): Remove forward declaration.
8417 (is_goto_target): Move to ax.c.
8418 (compile_bytecodes): Move to ax.c and call
8419 agent_get_trace_state_variable_value (...) and
8420 agent_set_trace_state_variable_value (...).
8422 * Makefile.in: Update ax.c and IPA dependencies.
8424 2012-02-24 Pedro Alves <palves@redhat.com>
8426 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8427 (cmd_bigqtbuffer_circular): ... this. Only handle
8428 'QTBuffer:circular:'.
8429 (handle_tracepoint_general_set): Adjust.
8431 2012-02-16 Yao Qi <yao@codesourcery.com>
8433 * inferiors.c: Move code to ...
8434 * dll.c: .... here. New.
8435 * server.h: Declare clear_dlls.
8436 * Makefile.in (SFILES): Add dll.c.
8440 2012-02-11 Yao Qi <yao@codesourcery.com>
8442 * server.c: (handle_monitor_command): Add a new parameter
8444 (handle_query): Update caller.
8446 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8448 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8449 * configure, config.in: Regenerate.
8450 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8453 2012-02-02 Pedro Alves <palves@redhat.com>
8455 Try SIGKILL first, then PTRACE_KILL.
8456 * linux-low.c (linux_kill_one_lwp): New.
8457 (linux_kill_one_lwp): Rename to ...
8458 (kill_one_lwp_callback): ... this. Use the new
8461 2012-02-02 Pedro Alves <palves@redhat.com>
8463 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8466 2012-01-27 Pedro Alves <palves@redhat.com>
8468 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8469 (elf_64_file_p): Make static.
8470 (linux_pid_exe_is_elf_64_file): New.
8471 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8472 Delete declarations.
8473 (linux_pid_exe_is_elf_64_file): Declare.
8474 * linux-x86-low.c (x86_arch_setup): Use
8475 linux_pid_exe_is_elf_64_file.
8477 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8479 * linux-low.c (linux_wait_for_event_1): Rename to ...
8480 (linux_wait_for_event): ... here and merge it with former
8481 linux_wait_for_event - new variable wait_ptid, use it.
8482 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8484 2012-01-23 Pedro Alves <palves@redhat.com>
8486 * server.c (main): Avoid yet another case of infinite loop while
8487 detaching/killing after a longjmp.
8489 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8492 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8494 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8496 * hostio.c (handle_readlink): New function.
8497 (handle_vFile): Call it to handle "vFile:readlink" packets.
8499 2012-01-20 Pedro Alves <palves@redhat.com>
8500 Ulrich Weigand <ulrich.weigand@linaro.org>
8502 * server.c (handle_v_requests): Only support vAttach and vRun to
8503 start multiple processes when in extended protocol mode.
8505 2012-01-17 Pedro Alves <palves@redhat.com>
8507 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8508 memalign plus mprotect to allocate the scratch buffer.
8510 2012-01-13 Pedro Alves <palves@redhat.com>
8512 * server.c (attach_inferior): Clear `cont_thread'.
8514 2012-01-13 Pedro Alves <palves@redhat.com>
8516 * server.c (main): Avoid infinite loop while detaching/killing
8519 2012-01-09 Doug Evans <dje@google.com>
8521 * server.c (start_inferior): Set last_ptid in --wrapper case.
8523 2012-01-06 Yao Qi <yao@codesourcery.com>
8525 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8527 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8529 2012-01-04 Yao Qi <yao@codesourcery.com>
8531 * tracepoint.c (cmd_qtdp): Print debug message
8532 for static tracepoint.
8534 2012-01-04 Yao Qi <yao@codesourcery.com>
8536 * tracepoint.c (trace_vdebug): Differentiate debug message
8537 between gdbserver and IPA.
8539 2012-01-03 Yao Qi <yao@codesourcery.com>
8541 * tracepoint.c (tracepoint_was_hit): Don't collect for
8544 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8546 * terminal.h: Reformat copyright header.
8548 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8550 * server.c (gdbserver_version): Update copyright year.
8551 * gdbreplay.c (gdbreplay_version): Likewise.
8553 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8555 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8558 2011-12-18 Hui Zhu <teawater@gmail.com>
8559 * linux-low.c (linux_create_inferior): Save return value to ret.
8561 2011-12-18 Hui Zhu <teawater@gmail.com>
8563 * linux-low.c (linux_create_inferior): Save return value to ret.
8565 2011-12-16 Doug Evans <dje@google.com>
8567 * linux-low.c (linux_create_inferior): If stdio connection,
8568 redirect stdin from /dev/null, stdout to stderr.
8569 * remote-utils.c (remote_is_stdio): New static global.
8570 (remote_connection_is_stdio): New function.
8571 (remote_prepare): Handle stdio connection.
8572 (remote_open): Ditto.
8573 (remote_close): Don't close stdin for stdio connections.
8574 (read_prim,write_prim): New functions. Replace all calls to
8575 read/write to these.
8576 * server.c (main): Watch for "-" argument. Move call to
8577 remote_prepare before start_inferior.
8578 * server.h (STDIO_CONNECTION_NAME): New macro.
8579 (remote_connection_is_stdio): Declare.
8581 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8582 in debugging output.
8584 2011-12-15 Yao Qi <yao@codesourcery.com>
8586 * tracepoint.c: Include sys/syscall.h.
8587 (gdb_ust_thread): Remove preprocessor conditional.
8589 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8591 * linux-low.c (linux_detach_one_lwp): Call
8592 the_low_target.prepare_to_resume before detaching.
8594 2011-12-14 Yao Qi <yao@codesourcery.com>
8596 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8599 2011-12-14 Yao Qi <yao@codesourcery.com>
8601 * i386-low.c (i386_low_stopped_data_address): Initialize local
8604 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8608 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8609 DR_CONTROL unless necessary. Extend comments.
8610 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8611 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8613 2011-12-13 Yao Qi <yao@codesourcery.com>
8615 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8617 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8619 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8621 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8622 Print new debug message for such case.
8624 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8626 Fix overlapping memcpy.
8627 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8628 the read_inferior_memory transfer.
8629 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8630 write_inferior_memory transfer.
8631 (set_fast_tracepoint_jump): New variable buf. Use it for the
8632 read_inferior_memory and write_inferior_memory transfers.
8633 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8634 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8635 Use it for the write_inferior_memory transfer.
8636 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8639 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8641 * linux-low.c (fetch_register, store_register): Make code
8642 consistent, fix formatting.
8644 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8646 * linux-low.c (usr_store_inferior_registers): Factor out code
8647 to handle individual registers into...
8648 (store_register): ... this new function.
8650 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8652 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8653 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8654 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8655 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8656 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8657 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8658 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8659 (srv_xmlfiles): Add new XML files.
8661 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8663 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8664 (init_registers_s390_linux32v1): Add prototype.
8665 (init_registers_s390_linux32v2): Likewise.
8666 (init_registers_s390_linux64v1): Likewise.
8667 (init_registers_s390_linux64v2): Likewise.
8668 (init_registers_s390x_linux64v1): Likewise.
8669 (init_registers_s390x_linux64v2): Likewise.
8670 (s390_num_regs): Increment to 52.
8671 (s390_regmap): Add orig_r2 register.
8672 (s390_num_regs_3264): Increment to 68.
8673 (s390_regmap_3264): Add orig_r2 register.
8674 (s390_collect_ptrace_register): Handle orig_r2 register.
8675 (s390_supply_ptrace_register): Likewise.
8676 (s390_fill_last_break): New function.
8677 (s390_store_last_break): Likewise.
8678 (s390_fill_system_call): New function.
8679 (s390_store_system_call): Likewise.
8680 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8682 (s390_check_regset): New function.
8683 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8684 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8685 Update target_regsets for available register sets.
8687 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8688 Jan Kratochvil <jan.kratochvil@redhat.com>
8690 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8691 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8693 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8694 * linux-low.h (struct process_info_private): New member r_debug.
8695 * server.c (handle_qxfer_libraries): Call
8696 the_target->qxfer_libraries_svr4.
8697 (handle_qxfer_libraries_svr4): New function.
8698 (qxfer_packets): New entry "libraries-svr4".
8699 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8700 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8701 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8702 PACKET_qXfer_libraries_svr4.
8704 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8706 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8707 PSW address/mask between 8-byte and 16-byte formats.
8708 (s390_supply_ptrace_register): Likewise.
8709 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8710 basic addressing mode bit.
8712 2011-11-24 Stan Shebs <stan@codesourcery.com>
8714 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8716 2011-11-17 Stan Shebs <stan@codesourcery.com>
8718 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8719 (tracing_start_time): New global.
8720 (tracing_stop_time): New global.
8721 (tracing_user_name): New global.
8722 (tracing_notes): New global.
8723 (tracing_stop_note): New global.
8724 (cmd_qtstart): Set traceframe_usage, start_time.
8725 (stop_tracing): Set stop_time.
8726 (cmd_qtstatus): Report additional status.
8727 (cmd_qtp): New function.
8728 (handle_tracepoint_query): Call it.
8729 (cmd_qtnotes): New function.
8730 (handle_tracepoint_general_set): Call it.
8731 (get_timestamp): Rename from tsv_get_timestamp.
8733 2011-11-14 Stan Shebs <stan@codesourcery.com>
8734 Kwok Cheung Yeung <kcy@codesourcery.com>
8736 * linux-x86-low.c (small_jump_insn): New.
8737 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8738 trampoline and error message, build a trampoline and issue a small
8739 jump instruction to it.
8740 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8741 trampoline and error message.
8742 (x86_get_min_fast_tracepoint_insn_len): New.
8743 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8744 * linux-low.h (struct linux_target_ops): Add arguments to
8745 install_fast_tracepoint_jump_pad operation, add new operation.
8746 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8748 (linux_get_min_fast_tracepoint_insn_len): New function.
8749 (linux_target_op): Add new operation.
8750 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8751 (gdb_trampoline_buffer_end): Ditto.
8752 (gdb_trampoline_buffer_error): Ditto.
8753 (struct ipa_sym_addresses): Add fields for new IPA variables.
8754 (symbol_list): Add entries for new IPA variables.
8755 (struct tracepoint): Add fields to hold the address range of the
8756 trampoline used by the tracepoint.
8757 (trampoline_buffer_head): New static variable.
8758 (trampoline_buffer_tail): Ditto.
8759 (claim_trampoline_space): New function.
8760 (have_fast_tracepoint_trampoline_buffer): New function.
8761 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8763 (install_fast_tracepoint): Ditto, also add error buffer argument.
8764 (cmd_qtminftpilen): New function.
8765 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8766 (fast_tracepoint_from_trampoline_address): New function.
8767 (fast_tracepoint_collecting): Handle trampoline as part of jump
8769 (set_trampoline_buffer_space): New function.
8770 (initialize_tracepoint): Initialize new IPA variables.
8771 * target.h (struct target_ops): Add arguments to
8772 install_fast_tracepoint_jump_pad operation, add new
8773 get_min_fast_tracepoint_insn_len operation.
8774 (target_get_min_fast_tracepoint_insn_len): New.
8775 (install_fast_tracepoint_jump_pad): Add arguments.
8776 * server.h (IPA_BUFSIZ): Define.
8777 * linux-i386-ipa.c: Include extra header files.
8778 (initialize_fast_tracepoint_trampoline_buffer): New function.
8779 (initialize_low_tracepoint): Call it.
8780 * server.h (set_trampoline_buffer_space): Declare.
8781 (claim_trampoline_space): Ditto.
8782 (have_fast_tracepoint_trampoline_buffer): Ditto.
8784 2011-11-14 Yao Qi <yao@codesourcery.com>
8786 * server.c (handle_query): Handle InstallInTrace for qSupported.
8787 * tracepoint.c (add_tracepoint): Sort list.
8788 (install_tracepoint, download_tracepoint): New.
8789 (cmd_qtdp): Call them to install and download tracepoints.
8790 (sort_tracepoints): Removed.
8791 (cmd_qtstart): Update.
8793 2011-11-14 Yao Qi <yao@codesourcery.com>
8795 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8796 * mem-break.h: Declare.
8797 * tracepoint.c (cmd_qtstart): Move some code to ...
8798 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8800 (download_tracepoints): Move some code to ...
8801 (download_tracepoint_1): ... here. New.
8803 2011-11-08 Yao Qi <yao@codesourcery.com>
8805 * remote-utils.c (relocate_instruction): A comment fix.
8807 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8809 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8810 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8811 dr_status_mirror and dr_control_mirror from debug_reg_state.
8812 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8813 (i386_initial_stuff): Remove use of deleted globals.
8814 (i386_get_thread_context, i386_set_thread_context,
8815 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8816 from debug_reg_state.
8818 2011-11-05 Yao Qi <yao@codesourcery.com>
8820 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8821 address as TPOINT's.
8823 2011-11-02 Stan Shebs <stan@codesourcery.com>
8825 * tracepoint.c (agent_mem_read_string): New function.
8826 (eval_agent_expr): Call it for tracenz.
8827 * server.c (handle_query): Report support for tracenz.
8829 2011-11-02 Yao Qi <yao@codesourcery.com>
8831 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8833 2011-11-02 Yao Qi <yao@codesourcery.com>
8835 * target.h: Fix a typo in comment.
8837 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8839 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8840 clobber the breakpoints' shadows with fast tracepoint jumps.
8841 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8842 * target.c (write_inferior_memory): Also pass MYADDR down to
8845 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8847 * configure.ac: Check support for personality routine.
8848 * configure: Regenerate.
8849 * config.in: Likewise.
8850 * linux-low.c: Include <sys/personality.h>.
8851 Define ADDR_NO_RANDOMIZE if necessary.
8852 (linux_create_inferior): Disable address space randomization when
8853 forking inferior, if requested.
8854 (linux_supports_disable_randomization): New function.
8855 (linux_target_ops): Install it.
8856 * server.h (disable_randomization): Declare.
8857 * server.c (disable_randomization): New global variable.
8858 (handle_general_set): Handle QDisableRandomization.
8859 (handle_query): Likewise for qSupported.
8860 (main): Support --disable-randomization and --no-disable-randomization
8861 command line arguments.
8862 * target.h (struct target_ops): Add supports_disable_randomization.
8863 (target_supports_disable_randomization): New macro.
8865 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8867 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8869 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8870 [!PT_GETDSBT] (target_loadmap): New definition.
8871 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8872 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8873 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8874 and PT_GETDSBT to LINUX_LOADMAP.
8875 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8876 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8878 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8880 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8881 (arm_linux_hwbp_cap): New static variable.
8882 (arm_linux_get_hwbp_cap): Replace by ...
8883 (arm_linux_init_hwbp_cap): ... this new function.
8884 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8885 (arm_linux_get_hw_watchpoint_count): Likewise.
8886 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8887 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8888 (arm_prepare_to_resume): Use perror_with_name instead of error.
8890 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8892 * linux-arm-low.c: Include <signal.h>.
8893 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8894 (struct arm_linux_hwbp_cap): New data type.
8895 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8896 (struct arm_linux_hw_breakpoint): New data type.
8897 (MAX_BPTS, MAX_WPTS): Define.
8898 (struct arch_process_info, struct arch_lwp_info): New data types.
8899 (arm_linux_get_hwbp_cap): New function.
8900 (arm_linux_get_hw_breakpoint_count): Likewise.
8901 (arm_linux_get_hw_watchpoint_count): Likewise.
8902 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8903 (arm_hwbp_control_initialize): Likewise.
8904 (arm_hwbp_control_is_enabled): Likewise.
8905 (arm_hwbp_control_is_initialized): Likewise.
8906 (arm_hwbp_control_disable): Likewise.
8907 (arm_linux_hw_breakpoint_equal): Likewise.
8908 (arm_linux_hw_point_initialize): Likewise.
8909 (struct update_registers_data): New data structure.
8910 (update_registers_callback: New function.
8911 (arm_insert_point): Likewise.
8912 (arm_remove_point): Likewise.
8913 (arm_stopped_by_watchpoint): Likewise.
8914 (arm_stopped_data_address): Likewise.
8915 (arm_new_process): Likewise.
8916 (arm_new_thread): Likewise.
8917 (arm_prepare_to_resume): Likewise.
8918 (the_low_target): Register arm_insert_point, arm_remove_point,
8919 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8920 arm_new_thread, and arm_prepare_to_resume.
8922 2011-09-15 Stan Shebs <stan@codesourcery.com>
8924 * server.h (struct emit_ops): Add compare-goto fields.
8925 * tracepoint.c (gdb_agent_op_sizes): New table.
8926 (emit_eq_goto): New function.
8927 (emit_ne_goto): New function.
8928 (emit_lt_goto): New function.
8929 (emit_le_goto): New function.
8930 (emit_gt_goto): New function.
8931 (emit_ge_goto): New function.
8932 (is_goto_target): New function.
8933 (compile_bytecodes): Recognize special cases of compare-goto
8934 combinations and call specialized emitters for them.
8935 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8936 (amd64_emit_ne_goto): New function.
8937 (amd64_emit_lt_goto): New function.
8938 (amd64_emit_le_goto): New function.
8939 (amd64_emit_gt_goto): New function.
8940 (amd64_emit_ge_goto): New function.
8941 (amd64_emit_ops): Add the new functions.
8942 (i386_emit_eq_goto): New function.
8943 (i386_emit_ne_goto): New function.
8944 (i386_emit_lt_goto): New function.
8945 (i386_emit_le_goto): New function.
8946 (i386_emit_gt_goto): New function.
8947 (i386_emit_ge_goto): New function.
8948 (i386_emit_ops): Add the new functions.
8950 2011-09-08 Stan Shebs <stan@codesourcery.com>
8952 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8953 (i386_emit_epilogue): Restore %ebx.
8955 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8957 * server.c (step_thread): Remove definition.
8958 (process_serial_event): Don't handle Hs.
8959 * server.h (step_thread): Remove declaration.
8960 * target.c (set_desired_inferior): Remove use of step_thread.
8962 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8964 * linux-low.c: Include linux-procfs.h.
8965 (linux_attach_lwp_1): Update comments.
8966 (linux_attach): Scan for existing threads when attaching to a
8967 process that is the tgid.
8968 * Makefile.in: Update dependencies.
8970 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8972 * configure.srv: Add linux-procfs.o dependencies.
8974 2011-08-14 Yao Qi <yao@codesourcery.com>
8976 * target.h (struct target_ops): Fix indent.
8977 * win32-low.c (win32_target_ops): Fix comment.
8979 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8980 Yao Qi <yao@codesourcery.com>
8982 * Makefile.in (clean): Remove tic6x-*.c files.
8983 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8984 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8985 (tic6x-c64xp-linux.c): Likewise.
8986 * configure.srv: Add support for tic6x-*-uclinux.
8987 * linux-tic6x-low.c: New.
8988 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8990 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8991 Yao Qi <yao@codesourcery.com>
8993 * target.h (struct target_ops): Add read_loadmap.
8994 * linux-low.c (struct target_loadseg): New type.
8995 (struct target_loadmap): New type.
8996 (linux_read_loadmap): New function.
8997 (linux_target_ops): Add linux_read_loadmap.
8998 * server.c (handle_query): Support qXfer:fdpic:read packet.
8999 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9002 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9004 * win32-low.c: Include <stdint.h>.
9006 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9008 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9009 to the inferior here.
9010 (i386_remove_aligned_watchpoint): Ditto.
9011 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9012 fit part of the watchpoint in the debug registers.
9013 (i386_update_inferior_debug_regs): New.
9014 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9015 registers, and only update the inferior on success.
9016 (i386_low_remove_watchpoint): Ditto.
9018 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9020 * linux-low.c (compare_ints, unique, list_threads, show_process,
9021 linux_core_of_thread): Delete.
9022 (linux_target_ops): Change linux_core_of_thread to
9023 linux_common_core_of_thread.
9024 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9025 * utils.c (malloc_failure): Change type of argument.
9026 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9027 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9028 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9029 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9030 (IPA_OBJS): Add common-utils-ipa.o.
9031 (ptid_h, linux_osdata_h): New macros.
9032 (server_h): Add common/common-utils.h, common/xml-utils.h,
9033 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9035 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9036 ptid.o, buffer.o): New rules.
9037 (linux-low.o): Add common/linux-osdata.h as a dependency.
9038 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9039 * configure.ac: Add AC_HEADER_DIRENT check.
9040 * config.in: Regenerate.
9041 * configure: Regenerate.
9042 * remote-utils.c (xml_escape_text): Delete.
9043 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9044 buffer_xml_printf): Move to common/buffer.c.
9045 * server.c (main): Remove call to initialize_inferiors.
9046 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9047 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9048 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9049 internal_error, gdb_assert, gdb_assert_fail): Delete.
9050 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9051 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9053 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9054 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9055 initialize_inferiors): Delete.
9057 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9059 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9062 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9064 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9066 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9068 2011-05-26 Yao Qi <yao@codesourcery.com>
9070 * Makefile.in (thread-db.o): Track dependence to
9071 common/gdb_thread_db.h.
9072 * thread-db.c: include gdb_thread_db.h from right place.
9074 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9076 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9077 __FILE__ and __LINE__ to internal_error.
9079 2011-05-13 Doug Evans <dje@google.com>
9081 * thread-db.c (try_thread_db_load_from_sdir): New function.
9082 (try_thread_db_load_from_dir): New function.
9083 (thread_db_load_search): Handle $sdir, ignore $pdir.
9084 Remove trying of system directories if search of
9085 libthread-db-search-path fails, that is now done via $sdir.
9087 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9089 * server.c (handle_query): Add EnableDisableTracepoints to the list
9090 of supported features.
9091 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9093 (cmd_qtenable_disable): New.
9094 (cmd_qtstart): Install tracepoints even if disabled.
9095 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9096 receiving a QTEnable or QTDisable packet.
9097 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9098 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9100 (gdb_probe): Skip data collection if static tracepoint is disabled.
9102 2011-05-10 Doug Evans <dje@google.com>
9104 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9106 2011-05-04 Doug Evans <dje@google.com>
9108 * linux-low.c (linux_join): Skip process lookup.
9109 * spu-low.c (spu_join): Ditto.
9110 * server.c (join_inferiors_callback): Delete.
9111 (process_serial_event): For 'D' packet (detach) call join_inferior
9114 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9116 * README: Don't mention xscale*-*-linux*.
9117 * configure.srv (xscale*-*-linux*): Don't handle target.
9119 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9121 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9123 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9124 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9125 (i386_emit_void_call_2): Likewise.
9127 2011-04-26 Yao Qi <yao@codesourcery.com>
9129 * linux-low.c: Move common macros to linux-ptrace.h.
9130 Include linux-ptrace.h.
9131 * Makefile.in (linux_ptrace_h): New.
9132 (linux-low.o): Depends on linux-ptrace.h.
9134 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9136 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9137 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9138 (remote_prepare): New function with most of the TCP code from ...
9139 (remote_open): ... here. Detect PORT here unconditionally. Move also
9140 setting transport_is_reliable.
9141 * server.c (run_once): New variable.
9142 (gdbserver_usage): Document it.
9143 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9144 the first run if RUN_ONCE.
9145 * server.h (run_once, remote_prepare): New declarations.
9147 2011-04-19 Tom Tromey <tromey@redhat.com>
9149 * win32-low.c (handle_load_dll): Remove duplicate "the".
9151 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9153 Remove support for old Cygwin 1.5 versions.
9154 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9155 function to avoid warning.
9156 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9159 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9161 * gdbserver/server.h (Macro _): Define it if not available.
9163 2011-03-14 Michael Snyder <msnyder@vmware.com>
9165 * hostio.c (handle_close): Remove unnecessary null test.
9167 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9169 * Makefile.in (maintainer-clean realclean distclean): Remove
9170 "make ... subdir_do" command.
9172 2011-03-10 Michael Snyder <msnyder@vmware.com>
9174 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9176 * server.c (handle_v_run): Free alloced buffer on early return.
9178 2011-03-09 Yao Qi <yao@codesourcery.com>
9181 2011-03-04 Yao Qi <yao@codesourcery.com>
9183 * Makefile.in: Remove GNU make feature --directory.
9185 2011-03-05 Yao Qi <yao@codesourcery.com>
9187 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9188 (subdir_do): New make target. Copied from gdb/Makefile.
9189 (maintainer-clean, realclean, distclean, clean): Call corresponding
9190 make targets in common/Makefile.
9192 2011-02-11 Yao Qi <yao@codesourcery.com>
9194 * configure.ac: Call AC_PROG_RANLIB.
9195 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9196 * configure: Regenerate.
9198 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9200 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9202 2011-03-06 Yao Qi <yao@codesourcery.com>
9204 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9206 2011-03-05 Yao Qi <yao@codesourcery.com>
9208 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9209 (subdir_do): New make target. Copied from gdb/Makefile.
9210 (maintainer-clean, realclean, distclean, clean): Call corresponding
9211 make targets in common/Makefile.
9213 2011-03-04 Yao Qi <yao@codesourcery.com>
9215 * Makefile.in: Remove GNU make feature --directory.
9217 2011-03-04 Michael Snyder <msnyder@vmware.com>
9219 * server.c (queue_stop_reply): Call xmalloc not malloc.
9221 2011-03-02 Michael Snyder <msnyder@vmware.com>
9223 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9225 2011-02-28 Michael Snyder <msnyder@vmware.com>
9227 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9228 (cmd_qtframe): Ditto.
9229 (cmd_qtbuffer): Ditto.
9230 (cmd_bigqtbuffer): Ditto.
9232 * utils.c (decimal2str): Initialize 'width' to nine, then
9235 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9237 * hostio.c (require_data): Free *data, not data.
9239 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9241 * hostio.c (require_data): Use free, not xfree.
9243 2011-02-27 Michael Snyder <msnyder@vmware.com>
9245 * server.c (handle_query): Discard unused value.
9247 * hostio.c (require_data): Free malloc memory before returning
9250 2011-02-26 Michael Snyder <msnyder@vmware.com>
9252 * linux-low.c (list_threads): Call closedir for dirent.
9254 2011-02-27 Michael Snyder <msnyder@vmware.com>
9256 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9257 a case statement falls through.
9259 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9261 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9264 2011-02-26 Michael Snyder <msnyder@vmware.com>
9266 * utils.c (decimal2str): Eliminate dead code and dead param.
9267 (pulongest): Drop dead param from call to decimal2str.
9270 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9272 Revert the following patch (not approved yet):
9273 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-21 Hui Zhu <teawater@gmail.com>
9279 * tracepoint.c (tp_printf): New function.
9280 (eval_agent_expr): Handle gdb_agent_op_printf.
9282 2011-02-18 Tom Tromey <tromey@redhat.com>
9284 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9285 (tracepoint.o): Likewise.
9286 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9287 (gdb_agent_op_names): Likewise.
9289 2011-02-18 Tom Tromey <tromey@redhat.com>
9291 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9292 gdb_agent_op_rot>: New constants.
9293 (gdb_agent_op_names): Add pick and roll.
9294 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9297 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9299 * aclocal.m4: Regenerated with aclocal-1.11.1.
9301 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9303 * server.c (handle_qxfer_traceframe_info): New.
9304 (qxfer_packets): Register "traceframe-info".
9305 (handle_query): Report support for qXfer:traceframe-info:read+.
9306 * tracepoint.c (match_blocktype): New.
9307 (traceframe_find_block_type): Rename to ...
9308 (traceframe_walk_blocks): ... this. Add callback filter argument,
9310 (traceframe_find_block_type): New, reimplemented on top of
9311 traceframe_walk_blocks.
9312 (build_traceframe_info_xml): New.
9313 (traceframe_read_info): New.
9314 * server.h (traceframe_read_info): Declare.
9316 2011-02-11 Yao Qi <yao@codesourcery.com>
9318 * configure.ac: Call AC_PROG_RANLIB.
9319 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9320 * configure: Regenerate.
9322 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9324 * server.c (gdb_read_memory): Change return semantics to allow
9326 (handle_search_memory_1): Adjust.
9327 (process_serial_event) <'m' packet>: Handle partial transfers.
9328 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9330 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9332 * regcache.c (init_register_cache): Initialize
9333 regcache->register_status.
9334 (free_register_cache): Release regcache->register_status.
9335 (regcache_cpy): Copy register_status.
9336 (registers_to_string): Print 'x's for unavailable registers.
9337 (supply_register): Mark the register's status valid or
9338 unavailable, depending on whether a buffer was passed in or not.
9339 (supply_register_zeroed): New.
9340 (supply_regblock): Mark the registers' status valid or
9341 unavailable, depending on whether a buffer was passed in or not.
9342 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9343 (struct regcache): New `register_status' field.
9344 (supply_register_zeroed): Declare.
9345 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9346 supply_register_zeroed, rather than passing a NULL buffer to
9348 * tracepoint.c (fetch_traceframe_registers): Update comment.
9350 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9352 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9355 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9357 * server.h (decode_xfer_write): Change prototype.
9358 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9359 and don't extract the annex here.
9360 * server.c (decode_xfer_read): Remove `annex' parameter,
9361 and don't extract the annex here.
9363 (struct qxfer): New.
9364 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9365 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9366 (handle_qxfer_statictrace): New functions, abstracted out from
9367 handle_query, and made to use the struct qxfer interface.
9368 (handle_threads_qxfer_proper): Rename to ...
9369 (handle_qxfer_threads_proper): ... this.
9370 (handle_threads_qxfer): Rename to ...
9371 (handle_qxfer_threads): ... this. Adjust.
9372 (qxfer_packets): New array.
9373 (handle_qxfer): New function.
9374 (handle_query): Use handle_qxfer.
9376 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9378 * gdbreplay.c: Shorten lines of >= 80 columns.
9379 * linux-low.c: Ditto.
9380 * linux-ppc-low.c: Ditto.
9381 * linux-s390-low.c: Ditto.
9382 * linux-sparc-low.c: Ditto.
9383 * linux-x86-low.c: Ditto.
9384 * linux-xtensa-low.c: Ditto.
9385 * mem-break.c: Ditto.
9387 * regcache.h: Ditto.
9388 * remote-utils.c: Ditto.
9391 * thread-db.c: Ditto.
9392 * tracepoint.c: Ditto.
9394 * win32-low.h: Ditto.
9396 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9398 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9401 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9403 * server.c (gdbserver_version): Update copyright year in version
9405 * gdbreplay.c (gdbreplay_version): Ditto.
9407 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9409 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9410 * linux-bfin-low.c: New file.
9411 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9412 PT_DATA_ADDR for BFIN targets.
9413 * Makefile.in (SFILES): Add linux-bfin-low.c.
9414 (clean): Remove reg-bfin.c.
9415 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9416 * README: Mention supported Blackfin targets.
9418 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9420 * .gitignore: New file.
9422 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9424 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9426 2010-10-22 Jie Zhang <jie@codesourcery.com>
9428 * Makefile.in: Add FLAGS_TO_PASS variable.
9429 (install): Remove dependency of install-only and recursively
9430 invoke make for install-only.
9432 2010-10-04 Doug Evans <dje@google.com>
9434 * Makefile.in (uninstall): Use $(DESTDIR).
9436 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9440 * linux-x86-low.c (compat_siginfo_from_siginfo)
9441 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9442 si_code is < 0. Check for si_code == SI_TIMER before checking for
9445 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9447 * lynx-i386-low.c: New file.
9448 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9450 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9452 * lynx-low.c (ptrace_request_to_str): Remove handling for
9453 request values that have been removed in LynxOS 5.x.
9455 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9457 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9460 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9462 * configure.ac: Add --enable-inprocess-agent option.
9463 * configure: Rebuilt.
9465 2010-09-06 Yao Qi <yao@codesourcery.com>
9467 * linux-low.c (linux_kill): Remove unused variable.
9468 (linux_stabilize_threads): Likewise.
9469 * server.c (start_inferior): Likewise.
9470 (queue_stop_reply_callback): Likewise.
9471 * tracepoint.c (do_action_at_tracepoint): Likewise.
9473 2010-09-06 Yao Qi <yao@codesourcery.com>
9475 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9478 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9480 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9482 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9484 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9487 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9489 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9490 gdbserver/lynx-ppc-low.c: New files.
9491 * Makefile.in (lynx_low_h): New variable.
9492 (lynx-low.o, lynx-ppc-low.o): New rules.
9493 * configure.ac: On LynxOS, link with -lnetinet.
9494 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9495 * configure: regenerate.
9497 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9499 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9500 * configure.ac: Add check for vasprintf and vsnprintf.
9501 * configure, config.in: Regenerate.
9502 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9504 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9506 * gdbreplay.c: Move include of alloca.h up, next to include of
9508 * server.h: Add include of malloc.h.
9509 * mem-break.c: Remove include of malloc.h.
9510 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9512 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9514 * Makefile.in (memmem.o): Build with -Wno-error.
9516 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9518 * utils.c (xsnprintf): Make non-static.
9519 * server.h: Add xsnprintf declaration.
9520 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9521 replace calls to snprintf by calls to xsnprintf throughout.
9523 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9525 * configure.ac: Add configure check for alloca.
9526 * configure, config.in: Regenerate.
9527 * server.h: Include alloca.h if it exists.
9528 * gdbreplay.c: Include alloca.h if it exists.
9530 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9532 * linux-low.c (__SIGRTMIN): Define if not already defined.
9533 (linux_create_inferior): Check for __ANDROID__ rather than
9535 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9536 are already deferred.
9537 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9538 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9539 stopped and already has a pending signal to report.
9540 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9541 a pending signal to report or is moving out of a jump pad.
9542 (linux_init_signals): Check for __ANDROID__ rather than
9545 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9547 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9548 debug_threads check. Avoid a linear search when not doing debug
9551 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9553 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9554 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9555 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9556 (process_event): Change local fd's type to gdb_fildes_t.
9557 (create_file_handler): Adjust prototype.
9558 (delete_file_handler): Adjust prototype.
9559 (handle_file_event): Adjust prototype. Use pfildes.
9560 (create_file_event): Adjsut prototype.
9561 * remote-utils.c (remote_desc, listen_desc): Change type to
9563 * server.h: New gdb_fildes_t typedef.
9564 [USE_WIN32API]: Include winsock2.h.
9565 (delete_file_handler, add_file_handler): Adjust prototypes.
9567 * utils.c (pfildes): New.
9569 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9571 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9572 * configure: Regenerate.
9574 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9576 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9577 (linux_done_accessing_memory): ... this.
9578 (linux_target_ops): Adjust.
9579 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9580 * nto-low.c (nto_target_ops): Adjust comment.
9581 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9582 * spu-low.c (spu_target_ops): Adjust comment.
9583 * target.h (target_ops): Rename unprepare_to_access_memory field
9584 to done_accessing_memory.
9585 (unprepare_to_access_memory): Rename to ...
9586 (done_accessing_memory): ... this.
9588 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9590 * linux-low.c (linux_prepare_to_access_memory): New.
9591 (linux_unprepare_to_access_memory): New.
9592 (linux_target_ops): Install them.
9593 * server.c (read_memory): Rename to ...
9594 (gdb_read_memory): ... this. Use
9595 prepare_to_access_memory/prepare_to_access_memory.
9596 (write_memory): Rename to ...
9597 (gdb_write_memory): ... this. Use
9598 prepare_to_access_memory/prepare_to_access_memory.
9599 (handle_search_memory_1): Adjust.
9600 (process_serial_event): Adjust.
9601 * target.h (struct target_ops): New fields
9602 prepare_to_access_memory and unprepare_to_access_memory.
9603 (prepare_to_access_memory, unprepare_to_access_memory): New.
9604 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9605 prepare_to_access_memory/prepare_to_access_memory.
9606 * nto-low.c (nto_target_ops): Adjust.
9607 * spu-low.c (spu_target_ops): Adjust.
9608 * win32-low.c (win32_target_ops): Adjust.
9610 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9612 * Makefile.in (WARN_CFLAGS): Get it from configure.
9613 (WERROR_CFLAGS): New.
9614 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9615 * configure.ac: Introduce --enable-werror, which adds -Werror to
9616 the compiler command line. Enabled by default. Disable with
9617 --disable-werror. Add -Wdeclaration-after-statement
9618 Wpointer-arith and -Wformat-nonliteral to warning flags.
9619 * configure: Regenerate.
9621 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9623 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9625 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9627 * gdbreplay.c (remote_error): New.
9629 (expect): Use gdbchar. Check for error reading from GDB.
9630 Clarify sync error output.
9631 (play): Check for errors writing to GDB.
9632 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9633 * remote-utils.c (getpkt): Check for errors writing to the remote
9636 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9638 * linux-low.c (linux_wait_1): Move non-debugging code out of
9639 `debug_threads' control.
9641 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9643 * linux-low.c (linux_wait_1): Don't set last_status here.
9644 * server.c (push_event, queue_stop_reply_callback): Assert we're
9645 not pushing a TARGET_WAITKIND_IGNORE event.
9646 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9647 (myresume, handle_target_event): Set the thread's last_resume_kind
9648 and last_status from the target returned status.
9650 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9654 * linux-x86-low.c (update_debug_registers_callback): New.
9655 (i386_dr_low_set_addr): Use it.
9656 (i386_dr_low_get_addr): New.
9657 (i386_dr_low_set_control): Use update_debug_registers_callback.
9658 (i386_dr_low_get_control): New.
9659 (i386_dr_low_get_status): Adjust.
9660 * linux-low.c (linux_stop_lwp): New.
9661 * linux-low.h (linux_stop_lwp): Declare.
9663 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9664 argument instead of a i386_debug_reg_state.
9665 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9666 a i386_debug_reg_state.
9667 (i386_insert_aligned_watchpoint): Adjust.
9668 (i386_remove_aligned_watchpoint): Adjust.
9669 (i386_low_stopped_data_address): Read the debug registers from the
9670 inferior instead of from the mirrors.
9671 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9672 (i386_dr_low_get_addr): Declare.
9673 (i386_dr_low_get_control): Declare.
9674 (i386_dr_low_get_status): Change prototype.
9676 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9677 (i386_dr_low_get_addr): New.
9678 (i386_dr_low_get_control): New.
9679 (i386_dr_low_get_status): Adjust prototype. Return
9681 (i386_initial_stuff): Clear dr_status_mirror and
9683 (i386_get_thread_context): Adjust.
9684 (i386_set_thread_context): Adjust.
9685 (i386_thread_added): Adjust.
9687 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9689 * linux-low.h (linux_thread_area): Delete declaration.
9691 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9693 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9694 after its termination.
9696 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9698 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9699 (gdb_wants_all_stopped): Delete.
9700 (linux_wait_1): Don't call them.
9701 * server.c (handle_v_cont): Tag all threads as want-stopped.
9702 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9703 stopped as "client-wants-stopped".
9705 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9707 * Makefile.in (signals_h): New.
9708 (server_h): Depend on it.
9709 (server.o): Don't depend on $(signals_def).
9710 (signals.o): Depend on $(signals_def).
9712 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9714 * Makefile.in (signals_def): New.
9715 (server_h): Append include/gdb/signals.h and signals_def.
9716 (server.o): Append signals_def.
9718 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9720 * server.c (handle_target_event): Use target_signal_to_host for
9721 resume_info.sig initialization.
9722 * target.h (struct thread_resume) <sig>: New comment.
9724 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9726 * server.c (handle_query): strcpy() the returned string from paddress()
9727 instead of sprintf().
9728 * utils.c (paddress): Return phex_nz().
9730 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9732 * server.c (handle_v_cont): Call mourn_inferior if process
9734 (myresume): Likewise.
9736 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9738 Static tracepoints, and integration with UST.
9740 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9741 * mem-break.c (uninsert_all_breakpoints)
9742 (reinsert_all_breakpoints): New.
9743 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9744 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9745 (gdb_agent_ust_loaded, helper_thread_id)
9746 (gdb_agent_helper_thread_id): New macros.
9747 (struct ipa_sym_addresses): Add addr_ust_loaded,
9748 addr_helper_thread_id, addr_cmd_buf.
9749 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9750 (in_process_agent_loaded_ust): New.
9751 (write_e_ust_not_loaded): New.
9752 (maybe_write_ipa_ust_not_loaded): New.
9753 (struct collect_static_trace_data_action): New.
9754 (enum tracepoint_type) <static_tracepoint>: New.
9755 (struct tracepoint) <handle>: Mention static tracepoints.
9756 (struct static_tracepoint_ctx): New.
9757 (CMD_BUF_SIZE): New.
9758 (add_tracepoint_action): Handle static tracepoint actions.
9759 (unprobe_marker_at): New.
9760 (clear_installed_tracepoints): Handle static tracepoints.
9761 (cmd_qtdp): Handle static tracepoints.
9762 (probe_marker_at): New.
9763 (cmd_qtstart): Handle static tracepoints.
9764 (response_tracepoint): Handle static tracepoints.
9765 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9766 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9767 (get_context_regcache): Handle static tracepoints.
9768 (do_action_at_tracepoint): Handle static tracepoint actions.
9769 (traceframe_find_block_type): Handle static trace data blocks.
9770 (traceframe_read_sdata): New.
9771 (download_tracepoints): Download static tracepoint actions.
9772 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9773 (GDB_PROBE_NAME): New.
9778 (ust_marker_to_static_tracepoint): New.
9780 (collect_ust_data_at_tracepoint): New.
9781 (gdb_ust_probe): New.
9782 (UNIX_PATH_MAX, SOCK_DIR): New.
9783 (gdb_ust_connect_sync_socket): New.
9784 (resume_thread, stop_thread): New.
9785 (run_inferior_command): New.
9786 (init_named_socket): New.
9787 (gdb_ust_socket_init): New.
9788 (cstr_to_hexstr): New.
9790 (first_marker, next_marker): New.
9791 (response_ust_marker): New.
9792 (cmd_qtfstm, cmd_qtsstm): New.
9793 (unprobe_marker_at, probe_marker_at): New.
9794 (cmd_qtstmat, gdb_ust_thread): New.
9795 (gdb_ust_init): New.
9796 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9797 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9799 (x86_64_st_collect_regmap): New.
9800 (X86_64_NUM_ST_COLLECT_GREGS): New.
9801 (AMD64_RIP_REGNUM): New.
9802 (supply_static_tracepoint_registers): New.
9803 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9805 (i386_st_collect_regmap): New.
9806 (i386_NUM_ST_COLLECT_GREGS): New.
9807 (supply_static_tracepoint_registers): New.
9808 * server.c (handle_query): Handle qXfer:statictrace:read.
9809 <qSupported>: Report support for StaticTracepoints, and
9810 qXfer:statictrace:read features.
9811 * server.h (traceframe_read_sdata)
9812 (supply_static_tracepoint_registers): Declare.
9813 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9814 (unpack_varlen_hex): Include in IPA build.
9815 * Makefile.in (ustlibs, ustinc): New.
9816 (IPA_OBJS): Add remote-utils-ipa.o.
9817 ($(IPA_LIB)): Link -ldl and -lpthread.
9819 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9820 * config.in, configure: Regenerate.
9822 2010-06-20 Ian Lance Taylor <iant@google.com>
9823 Pedro Alves <pedro@codesourcery.com>
9825 * linux-x86-low.c (always_true): Delete.
9826 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9827 trying to fool the compiler with always_true.
9829 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9831 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9832 conditions in gdbserver.
9834 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9836 * spu-low.c (spu_read_memory): Wrap around local store limit.
9837 (spu_write_memory): Likewise.
9839 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9841 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9842 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9844 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9846 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9847 uses with LONGEST uses.
9849 2010-06-14 Stan Shebs <stan@codesourcery.com>
9850 Pedro Alves <pedro@codesourcery.com>
9854 * linux-x86-low.c: Include limits.h.
9859 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9860 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9861 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9862 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9863 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9864 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9865 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9866 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9867 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9868 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9869 (amd64_emit_void_call_2): New.
9870 (amd64_emit_ops): New.
9871 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9872 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9873 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9874 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9875 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9876 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9877 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9878 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9879 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9880 (i386_emit_stack_adjust, i386_emit_int_call_1)
9881 (i386_emit_void_call_2): New.
9882 (i386_emit_ops): New.
9883 (x86_emit_ops): New.
9884 (the_low_target): Install x86_emit_ops.
9885 * server.h (struct emit_ops): New.
9886 (get_raw_reg_func_addr): Declare.
9887 (current_insn_ptr, emit_error): Declare.
9888 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9889 (set_trace_state_variable_value): New defines.
9890 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9891 addr_get_trace_state_variable_value and
9892 addr_set_trace_state_variable_value.
9893 (symbol_list): New fields for get_raw_reg,
9894 get_trace_state_variable_value and set_trace_state_variable_value.
9895 (condfn): New typedef.
9896 (struct tracepoint): New field `compiled_cond'.
9897 (do_action_at_tracepoint): Clear compiled_cond.
9898 (get_trace_state_variable_value, set_trace_state_variable_value):
9900 (condition_true_at_tracepoint): If there's a compiled condition,
9902 (current_insn_ptr, emit_error): New globals.
9903 (struct bytecode_address): New.
9904 (get_raw_reg_func_addr): New.
9905 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9906 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9907 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9908 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9909 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9910 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9911 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9912 (compile_tracepoint_condition, compile_bytecodes): New.
9913 * target.h (emit_ops): Forward declare.
9914 (struct target_ops): New field emit_ops.
9915 (target_emit_ops): New.
9916 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9917 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9918 * linux-low.c (linux_emit_ops): New.
9919 (linux_target_ops): Install it.
9920 * linux-low.h (struct linux_target_ops): New field emit_ops.
9922 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9924 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9925 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9927 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9928 Stan Shebs <stan@codesourcery.com>
9930 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9931 (all): Depend on $(extra_libraries).
9932 (install-only): Install the IPA.
9933 (IPA_OBJS, IPA_LIB): New.
9934 (clean): Remove the IPA lib.
9935 (IPAGENT_CFLAGS): New.
9936 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9937 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9938 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9939 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9940 * configure.ac: Check for atomic builtins support in the compiler.
9941 (IPA_DEPFILES, extra_libraries): Define.
9942 * configure.srv (ipa_obj): Add description.
9943 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9944 (i[34567]86-*-linux*): Set ipa_obj.
9945 (x86_64-*-linux*): Set ipa_obj.
9946 * linux-low.c (stabilizing_threads): New.
9947 (supports_fast_tracepoints): New.
9948 (linux_detach): Stabilize threads before detaching.
9949 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9950 the lwp is either not stabilizing, or is moving out of a jump pad.
9951 (linux_fast_tracepoint_collecting): New.
9952 (maybe_move_out_of_jump_pad): New.
9953 (enqueue_one_deferred_signal): New.
9954 (dequeue_one_deferred_signal): New.
9955 (linux_wait_for_event_1): If moving out of a jump pad, defer
9956 pending signals to later.
9957 (linux_stabilize_threads): New.
9958 (linux_wait_1): Check if threads need moving out of jump pads, and
9960 (stuck_in_jump_pad_callback): New.
9961 (move_out_of_jump_pad_callback): New.
9963 (linux_resume_one_lwp): Handle moving out of jump pads.
9964 (linux_set_resume_request): Dequeue deferred signals.
9965 (need_step_over_p): Also step over fast tracepoint jumps.
9966 (start_step_over): Also uninsert fast tracepoint jumps.
9967 (finish_step_over): Also reinsert fast tracepoint jumps.
9968 (linux_install_fast_tracepoint_jump): New.
9969 (linux_target_ops): Install linux_stabilize_threads and
9970 linux_install_fast_tracepoint_jump_pad.
9971 * linux-low.h (linux_target_ops) <get_thread_area,
9972 install_fast_tracepoint_jump_pad>: New fields.
9973 (struct lwp_info) <collecting_fast_tracepoint,
9974 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9975 (linux_get_thread_area): Declare.
9976 * linux-x86-low.c (jump_insn): New.
9977 (x86_get_thread_area): New.
9978 (append_insns): New.
9980 (amd64_install_fast_tracepoint_jump_pad): New.
9981 (i386_install_fast_tracepoint_jump_pad): New.
9982 (x86_install_fast_tracepoint_jump_pad): New.
9983 (the_low_target): Install x86_get_thread_area and
9984 x86_install_fast_tracepoint_jump_pad.
9985 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9986 (struct fast_tracepoint_jump): New.
9987 (fast_tracepoint_jump_insn): New.
9988 (fast_tracepoint_jump_shadow): New.
9989 (find_fast_tracepoint_jump_at): New.
9990 (fast_tracepoint_jump_here): New.
9991 (delete_fast_tracepoint_jump): New.
9992 (set_fast_tracepoint_jump): New.
9993 (uninsert_fast_tracepoint_jumps_at): New.
9994 (reinsert_fast_tracepoint_jumps_at): New.
9995 (set_breakpoint_at): Use write_inferior_memory.
9996 (uninsert_raw_breakpoint): Use write_inferior_memory.
9997 (check_mem_read): Mask out fast tracepoint jumps.
9998 (check_mem_write): Mask out fast tracepoint jumps.
9999 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10000 (set_fast_tracepoint_jump): Declare.
10001 (delete_fast_tracepoint_jump)
10002 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10003 (reinsert_fast_tracepoint_jumps_at): Declare.
10004 * regcache.c: Don't compile many functions when building the
10005 in-process agent library.
10006 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10007 the register buffer in the heap.
10008 (free_register_cache): If the register buffer isn't owned by the
10009 regcache, don't free it.
10010 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10011 pre-existing register caches.
10012 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10014 (convert_ascii_to_int): : Constify `from' parameter type.
10015 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10016 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10017 the needed buffer in-place.
10018 (relocate_instruction): New.
10019 * server.c (handle_query) <qSymbols>: If the target supports
10020 tracepoints, give it a chance of looking up symbols. Report
10021 support for fast tracepoints.
10022 (handle_status): Stabilize threads.
10023 (process_serial_event): Adjust.
10024 * server.h (struct fast_tracepoint_jump): Forward declare.
10025 (struct process_info) <fast_tracepoint_jumps>: New field.
10026 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10027 (decode_X_packet, decode_M_packet): Adjust.
10028 (relocate_instruction): Declare.
10029 (in_process_agent_loaded): Declare.
10030 (tracepoint_look_up_symbols): Declare.
10031 (struct fast_tpoint_collect_status): Declare.
10032 (fast_tracepoint_collecting): Declare.
10033 (force_unlock_trace_buffer): Declare.
10034 (handle_tracepoint_bkpts): Declare.
10035 (initialize_low_tracepoint)
10036 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10037 * target.h (struct target_ops) <stabilize_threads,
10038 install_fast_tracepoint_jump_pad>: New fields.
10039 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10040 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10041 [HAVE_STDINT_H]: Include stdint.h.
10042 (trace_debug_1): Rename to ...
10043 (trace_vdebug): ... this.
10044 (trace_debug): Rename to ...
10045 (trace_debug_1): ... this. Add `level' parameter.
10046 (trace_debug): New.
10047 (ATTR_USED, ATTR_NOINLINE): New.
10048 (IP_AGENT_EXPORT): New.
10049 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10050 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10051 (about_to_request_buffer_space, trace_buffer_is_full)
10052 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10053 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10054 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10055 (traceframe_write_count, traceframes_created)
10056 (trace_state_variables)
10057 New renaming defines.
10058 (struct ipa_sym_addresses): New.
10059 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10060 (symbol_list): New.
10061 (ipa_sym_addrs): New.
10062 (all_tracepoint_symbols_looked_up): New.
10063 (in_process_agent_loaded): New.
10064 (write_e_ipa_not_loaded): New.
10065 (maybe_write_ipa_not_loaded): New.
10066 (tracepoint_look_up_symbols): New.
10067 (debug_threads) [IN_PROCESS_AGENT]: New.
10068 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10069 (UNKNOWN_SIDE_EFFECTS): New.
10070 (stop_tracing): New.
10071 (flush_trace_buffer): New.
10072 (stop_tracing_bkpt): New.
10073 (flush_trace_buffer_bkpt): New.
10074 (read_inferior_integer): New.
10075 (read_inferior_uinteger): New.
10076 (read_inferior_data_pointer): New.
10077 (write_inferior_data_pointer): New.
10078 (write_inferior_integer): New.
10079 (write_inferior_uinteger): New.
10080 (struct collect_static_trace_data_action): Delete.
10081 (enum tracepoint_type): New.
10082 (struct tracepoint) <type>: New field `type'.
10083 <actions_str, step_actions, step_actions_str>: Only include in
10085 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10086 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10087 (tracepoints): Use IP_AGENT_EXPORT.
10088 (last_tracepoint): Don't include in the IPA.
10089 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10090 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10091 (alloced_trace_state_variables): New.
10092 (trace_state_variables): Use IP_AGENT_EXPORT.
10093 (traceframe_t): Delete unused variable.
10094 (circular_trace_buffer): Don't include in the IPA.
10095 (trace_buffer_start): Delete.
10096 (struct trace_buffer_control): New.
10097 (trace_buffer_free): Delete.
10098 (struct ipa_trace_buffer_control): New.
10099 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10100 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10102 (trace_buffer_ctrl): New.
10103 (TRACE_BUFFER_CTRL_CURR): New.
10104 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10105 Reimplement as macros.
10106 (trace_buffer_wrap): Delete.
10107 (traceframe_write_count, traceframe_read_count)
10108 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10109 (struct tracepoint_hit_ctx) <type>: New field.
10110 (struct fast_tracepoint_ctx): New.
10111 (memory_barrier): New.
10113 (record_tracepoint_error): Update atomically in the IPA.
10114 (clear_inferior_trace_buffer): New.
10115 (about_to_request_buffer_space): New.
10116 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10117 updating the same buffer.
10118 (add_tracepoint): Default the tracepoint's type to trap
10119 tracepoint, and orig_size to -1.
10120 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10121 internal variables.
10122 (create_trace_state_variable): New parameter `gdb'. Handle it.
10123 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10124 (cmd_qtdp): Handle fast tracepoints.
10125 (cmd_qtdv): Adjust.
10126 (max_jump_pad_size): New.
10127 (gdb_jump_pad_head): New.
10128 (get_jump_space_head): New.
10129 (claim_jump_space): New.
10130 (sort_tracepoints): New.
10131 (MAX_JUMP_SIZE): New.
10132 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10134 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10135 support. Upload fast traceframes, and delete internal IPA
10137 (stop_tracing_handler): New.
10138 (flush_trace_buffer_handler): New.
10139 (cmd_qtstop): Upload fast tracepoints.
10140 (response_tracepoint): Handle fast tracepoints.
10141 (tracepoint_finished_step): Upload fast traceframes. Set the
10142 tracepoint hit context's tracepoint type.
10143 (handle_tracepoint_bkpts): New.
10144 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10145 type. Add comment about fast tracepoints.
10146 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10147 non-existing action_str field.
10148 (get_context_regcache): Handle fast tracepoints.
10149 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10151 (fast_tracepoint_from_jump_pad_address): New.
10152 (fast_tracepoint_from_ipa_tpoint_address): New.
10153 (collecting_t): New.
10154 (force_unlock_trace_buffer): New.
10155 (fast_tracepoint_collecting): New.
10157 (gdb_collect): New.
10158 (write_inferior_data_ptr): New.
10159 (target_tp_heap): New.
10160 (target_malloc): New.
10161 (download_agent_expr): New.
10163 (download_tracepoints): New.
10164 (download_trace_state_variables): New.
10165 (upload_fast_traceframes): New.
10166 (IPA_FIRST_TRACEFRAME): New.
10167 (IPA_NEXT_TRACEFRAME_1): New.
10168 (IPA_NEXT_TRACEFRAME): New.
10169 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10170 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10171 (gdb_jump_pad_buffer_end): New.
10172 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10173 (initialize_tracepoint): Adjust.
10174 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10175 buffer. Initialize the low module.
10176 * utils.c (PREFIX, TOOLNAME): New.
10177 (malloc_failure): Use PREFIX.
10178 (error): In the IPA, an error causes an exit.
10179 (fatal, warning): Use PREFIX.
10180 (internal_error): Use TOOLNAME.
10181 (NUMCELLS): Increase to 10.
10182 * configure, config.in: Regenerate.
10184 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10186 * server.c (handle_query) <qSupported>: Do two passes over the
10187 qSupported string to avoid nesting strtok.
10189 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10191 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10193 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10194 -Wl,--dynamic-list.
10195 * configure: Regenerate.
10196 * proc-service.list: New.
10198 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10200 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10203 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10205 * gdbreplay.c (remote_open): Check error return from socket() call by
10206 its equality to -1 not by it being negative.
10207 * remote-utils.c (remote_open): Likewise.
10209 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10211 * config.h: Regenerate.
10213 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10215 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10216 doesn't provide PTRACE_GET_THREAD_AREA.
10218 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10220 * linux-m68k-low.c: Include <asm/ptrace.h>
10221 (ps_get_thread_area): Implement.
10223 2010-05-03 Doug Evans <dje@google.com>
10225 * event-loop.c (struct callback_event): New struct.
10226 (callback_list): New global.
10227 (append_callback_event, delete_callback_event): New functions.
10228 (process_callback): New function.
10229 (start_event_loop): Call it.
10230 * remote-utils.c (NOT_SCHEDULED): Define.
10231 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10232 moved out of readchar.
10233 (readchar): Rewrite. Call reschedule before returning.
10234 (reset_readchar): New function.
10235 (remote_close): Call it.
10236 (process_remaining, reschedule): New functions.
10237 * server.h (callback_handler_func): New typedef.
10238 (append_callback_event, delete_callback_event): Declare.
10240 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10242 * proc-service.c (ps_pglobal_lookup): Use
10243 thread_db_look_up_one_symbol.
10244 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10245 parameter. Use it instead of all_symbols_looked_up.
10246 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10248 (all_symbols_looked_up): Don't declare.
10249 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10250 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10252 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10253 Set all_symbols_looked_up here.
10254 (thread_db_look_up_one_symbol): New.
10255 (thread_db_get_tls_address): Adjust.
10256 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10257 thread_db object on the heap, and tentatively set it in the
10259 (thread_db_init): Don't set all_symbols_looked_up here.
10260 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10262 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10264 * linux-low.c (linux_kill, linux_detach): Adjust.
10265 (status_pending_p_callback): Remove redundant statement. Check
10266 for !TARGET_WAITIKIND_IGNORE, instead of
10267 TARGET_WAITKIND_STOPPED.
10268 (handle_tracepoints): Make sure LWP is locked. Adjust.
10269 (linux_wait_for_event_1): Adjust.
10270 (linux_cancel_breakpoints): New.
10271 (unsuspend_one_lwp): New.
10272 (unsuspend_all_lwps): New.
10273 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10274 (send_sigstop_callback): Change return type to int, add new
10275 `except' parameter and handle it.
10276 (suspend_and_send_sigstop_callback): New.
10277 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10278 pass them down. If SUSPEND, also increment the lwp's suspend
10280 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10281 (need_step_over_p): Don't consider suspended LWPs.
10282 (start_step_over): Adjust.
10283 (proceed_one_lwp): Change return type to int, add new `except'
10284 parameter and handle it.
10285 (unsuspend_and_proceed_one_lwp): New.
10286 (proceed_all_lwps): Use find_inferior instead of
10288 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10289 also decrement the suspend count of LWPs. Pass `except' down,
10290 instead of hacking its suspend count.
10291 (linux_pause_all): Add `freeze' parameter. Adjust.
10292 (linux_unpause_all): New.
10293 (linux_target_ops): Install linux_unpause_all.
10294 * server.c (handle_status): Adjust.
10295 * target.h (struct target_ops): New fields `unpause_all' and
10296 `cancel_breakpoints'. Add new parameter to `pause_all'.
10297 (pause_all): Add new `freeze' parameter.
10298 (unpause_all): New.
10299 (cancel_breakpoints): New.
10300 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10301 cancel breakpoints.
10302 (cmd_qtstart): Pause threads.
10303 (stop_tracing): Pause threads, and cancel breakpoints.
10304 * win32-low.c (win32_target_ops): Adjust.
10306 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10308 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10309 the inferior right away from here...
10310 (linux_wait_1): ... to here, and adjust to check the thread's
10311 last_resume_kind instead of the lwp's step or stop_expected flags.
10313 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10315 * README: Use consistent `GDB' and `GDBserver' spellings.
10317 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10319 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10320 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10321 (linux_detach_one_lwp): Assume the lwp is stopped.
10322 (any_thread_of): Delete.
10323 (linux_detach): Stop all lwps here. Don't blindly delete all
10325 (delete_lwp_callback): New.
10326 (linux_mourn): Delete all lwps of the process that is gone.
10327 (linux_wait_1): Don't delete the last lwp of the process here.
10328 * mem-break.h (mark_breakpoints_out): Declare.
10329 * mem-break.c (mark_breakpoints_out): New.
10330 (free_all_breakpoints): Use it.
10331 * server.c (handle_target_event): If the process is gone, mark
10333 * thread-db.c (struct thread_db) <create_bp>: New field.
10334 (thread_db_enable_reporting): Fix prototype. Store a thread event
10335 breakpoint reference in the thread_db struct.
10336 (thread_db_load_search): Clear the thread_db object.
10337 (try_thread_db_load_1): Ditto.
10338 (switch_to_process): New.
10339 (disable_thread_event_reporting): Use it.
10340 (remove_thread_event_breakpoints): New.
10341 (thread_db_detach, thread_db_mourn): Use it.
10343 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10345 * linux-low.c (linux_enable_event_reporting): New.
10346 (linux_wait_for_event_1, handle_extended_wait): Use it.
10348 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10350 * linux-low.c (linux_kill_one_lwp, linux_kill)
10351 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10352 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10353 SIGSTOP even if the LWP is stopped.
10354 (send_sigstop_callback): New.
10355 (stop_all_lwps): Use send_sigstop_callback instead.
10356 (linux_resume_one_thread): Adjust.
10357 (proceed_one_lwp): Still proceed an LWP that the client has
10358 requested to stop, if we haven't reported it as stopped yet. Make
10359 sure that LWPs the client want stopped, have a pending SIGSTOP.
10361 2010-04-26 Doug Evans <dje@google.com>
10363 * server.c (handle_general_set): Make static.
10365 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10366 Print received char after testing for error/eof instead of before.
10367 (input_interrupt): Tweak comment.
10369 2010-04-23 Doug Evans <dje@google.com>
10371 * server.c (start_inferior): Print inferior argv if --debug.
10373 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10375 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10376 * nto-x86-low.c: Include server.h
10378 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10380 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10381 be consistent with other sources of this directory.
10382 (init_registers_amd64): Correct name of source file of this function
10385 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10387 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10388 64-bit executables.
10390 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10392 * win32-i386-low.c: Add 64-bit support.
10393 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10394 (init_registers_amd64): Declare.
10395 (mappings): Add 64-bit version of array.
10396 (init_windows_x86): New function.
10397 (the_low_target): Change init_arch field to init_windows_x86.
10399 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10401 * win32-low.c: Adapt to support also 64-bit architecture.
10402 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10403 (get_image_name): Use SIZE_T type for local variable `done'.
10404 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10405 (toolhelp_get_dll_name): Idem.
10406 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10407 Use uintptr_t typecast to avoid warning.
10408 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10409 (handle_exception): Use phex_nz to avoid warning.
10410 (win32_wait): Remove unused local variable `process'.
10412 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10414 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10417 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10419 * configure.ac: Use `ws2_32' library for srv_mingw.
10420 * configure: Regenerate.
10421 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10422 * remote-utils.c: Likewise.
10424 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10426 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10427 if __x86_64__ is defined.
10429 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10431 * configure: Regenerate.
10433 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10435 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10436 * target.h (target_ops): New get_tib_address field.
10437 * win32-low.h (win32_thread_info): Add thread_local_base field.
10438 * win32-low.c (child_add_thread): Add tlb argument.
10439 Set thread_local_base field to TLB.
10440 (get_child_debug_event): Adapt to child_add_thread change.
10441 (win32_get_tib_address): New function.
10442 (win32_target_ops): Set get_tib_address field to
10443 win32_get_tib_address.
10444 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10446 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10448 * linux-low.c (linux_mourn): Also remove the process.
10449 * server.c (handle_target_event): Don't remove the process here.
10450 * nto-low.c (nto_mourn): New.
10451 (nto_target_ops): Install it.
10452 * spu-low.c (spu_mourn): New.
10453 (spu_target_ops): Install it.
10454 * win32-low.c (win32_mourn): New.
10455 (win32_target_ops): Install it.
10457 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10459 * server.h (buffer_xml_printf): Remove redundant `;'.
10461 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10463 * regcache.c (set_register_cache): Invalidate regcaches before
10464 changing the register cache layout.
10465 (regcache_invalidate_one): Allow a NULL regcache.
10466 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10467 regcaches before changing the register cache layout or the target
10470 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10472 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10473 variable warning on Linux/x86-64.
10475 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10477 GDBserver disconnected tracing support.
10479 * linux-low.c (linux_remove_process): Delete.
10480 (add_lwp): Don't set last_resume_kind here.
10481 (linux_kill): Use `mourn'.
10482 (linux_detach): Use `thread_db_detach', and `mourn'.
10483 (linux_mourn): New.
10484 (linux_attach_lwp_1): Adjust comment.
10485 (linux_attach): last_resume_kind moved the thread_info; adjust.
10486 (status_pending_p_callback): Adjust.
10487 (linux_wait_for_event_1): Adjust.
10488 (count_events_callback, select_singlestep_lwp_callback)
10489 (select_event_lwp_callback, cancel_breakpoints_callback)
10490 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10491 (proceed_one_lwp): Adjust.
10492 (linux_async): Add debug output.
10493 (linux_thread_stopped): New.
10494 (linux_pause_all): New.
10495 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10497 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10498 (thread_db_free): Delete declaration.
10499 (thread_db_detach, thread_db_mourn): Declare.
10500 * thread-db.c (thread_db_init): Use thread_db_mourn.
10501 (thread_db_free): Delete, split in two.
10502 (disable_thread_event_reporting): New.
10503 (thread_db_detach): New.
10504 (thread_db_mourn): New.
10506 * server.h (struct thread_info) <last_resume_kind>: New field.
10507 <attached>: Add comment.
10508 <gdb_detached>: New field.
10509 (handler_func): Change return type to int.
10510 (handle_serial_event, handle_target_event): Ditto.
10511 (gdb_connected): Declare.
10513 (disconnected_tracing): Declare.
10514 (stop_tracing): Declare.
10516 * server.c (handle_query) <qSupported>: Report support for
10517 disconnected tracing.
10518 (queue_stop_reply_callback): Account for running threads.
10519 (gdb_wants_thread_stopped): New.
10520 (gdb_wants_all_threads_stopped): New.
10521 (gdb_reattached_process): New.
10522 (handle_status): Clear the `gdb_detached' flag of all processes.
10523 In all-stop, stop all threads.
10524 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10525 (process_serial_event): If the remote connection breaks, or if an
10526 exit was forced with "monitor exit", force an event loop exit.
10527 Handle disconnected tracing on detach.
10528 (handle_serial_event): Adjust.
10529 (handle_target_event): If GDB isn't connected, forward events back
10530 to the inferior, unless the last process exited, in which case,
10531 exit gdbserver. Adjust interface.
10533 * remote-utils.c (remote_open): Don't block in accept. Instead
10534 register an event loop source on the listen socket file
10535 descriptor. Refactor bits into ...
10536 (listen_desc): ... this new global.
10537 (gdb_connected): ... this new function.
10538 (enable_async_notification): ... this new function.
10539 (handle_accept_event): ... this new function.
10540 (remote_close): Clear remote_desc.
10542 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10544 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10546 (mourn_inferior): Define.
10547 (target_process_qsupported): Avoid the dangling else problem.
10548 (thread_stopped): Define.
10549 (pause_all): Define.
10550 (target_waitstatus_to_string): Declare.
10551 * target.c (target_waitstatus_to_string): New.
10553 * tracepoint.c (tracing): Make extern.
10554 (disconnected_tracing): New.
10555 (stop_tracing): Make extern. Handle tracing stops due to GDB
10557 (cmd_qtdisconnected): New.
10558 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10559 (handle_tracepoint_general_set): Handle QTDisconnected.
10561 * event-loop.c (event_handler_func): Change return type to int.
10562 (process_event): Bail out if the event handler wants the event
10564 (handle_file_event): Ditto.
10565 (start_event_loop): Bail out if the event handler wants the event
10568 * nto-low.c (nto_target_ops): Adjust.
10569 * spu-low.c (spu_wait): Don't remove the process here.
10570 (spu_target_ops): Adjust.
10571 * win32-low.c (win32_wait): Don't remove the process here.
10572 (win32_target_ops): Adjust.
10574 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10576 * regcache.c (realloc_register_cache): Invalidate inferior's
10577 regcache before recreating it.
10579 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10581 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10583 2010-04-09 Stan Shebs <stan@codesourcery.com>
10584 Pedro Alves <pedro@codesourcery.com>
10586 * server.h (LONGEST): New.
10587 (struct thread_info) <while_stepping>: New field.
10588 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10590 (initialize_tracepoint, handle_tracepoint_general_set)
10591 (handle_tracepoint_query, tracepoint_finished_step)
10592 (tracepoint_was_hit, release_while_stepping_state_list):
10593 (current_traceframe): Declare.
10594 * server.c (handle_general_set): Handle tracepoint packets.
10595 (read_memory): New.
10596 (write_memory): New.
10597 (handle_search_memory_1): Use read_memory.
10598 (handle_query): Report support for conditional tracepoints, trace
10599 state variables, and tracepoint sources. Handle tracepoint
10601 (main): Initialize the tracepoints module.
10602 (process_serial_event): Handle traceframe reads/writes.
10604 * linux-low.c (handle_tracepoints): New.
10605 (linux_wait_1): Call it.
10606 (linux_resume_one_lwp): Handle while-stepping.
10607 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10608 (linux_target_ops): Install them.
10609 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10611 * linux-x86-low.c (x86_supports_tracepoints): New.
10612 (the_low_target). Install it.
10614 * mem-break.h (delete_breakpoint): Declare.
10615 * mem-break.c (delete_breakpoint): Make external.
10617 * target.h (struct target_ops): Add `supports_tracepoints',
10618 `read_pc', and `write_pc' fields.
10619 (target_supports_tracepoints): Define.
10620 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10623 * regcache.h (struct regcache) <registers_owned>: New field.
10624 (init_register_cache, regcache_cpy): Declare.
10625 (regcache_read_pc, regcache_write_pc): Declare.
10626 (register_cache_size): Declare.
10627 (supply_regblock): Declare.
10628 * regcache.c (init_register_cache): New.
10629 (new_register_cache): Use it.
10630 (regcache_cpy): New.
10631 (register_cache_size): New.
10632 (supply_regblock): New.
10633 (regcache_read_pc, regcache_write_pc): New.
10635 * tracepoint.c: New.
10637 * Makefile.in (OBS): Add tracepoint.o.
10638 (tracepoint.o): New rule.
10640 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10642 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10644 (i386-mmx.c): Likewise.
10645 (i386-mmx-linux.o): Likewise.
10646 (i386-mmx-linux.c): Likewise.
10648 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10649 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10650 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10651 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10653 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10654 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10655 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10657 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10659 * Makefile.in (clean): Updated.
10661 (i386-avx.c): Likewise.
10662 (i386-avx-linux.o): Likewise.
10663 (i386-avx-linux.c): Likewise.
10664 (amd64-avx.o): Likewise.
10665 (amd64-avx.c): Likewise.
10666 (amd64-avx-linux.o): Likewise.
10667 (amd64-avx-linux.c): Likewise.
10669 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10670 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10671 (srv_amd64_regobj): Add amd64-avx.o.
10672 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10673 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10674 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10675 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10676 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10677 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10678 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10680 * i387-fp.c: Include "i386-xstate.h".
10682 (i387_cache_to_xsave): Likewise.
10683 (i387_xsave_to_cache): Likewise.
10684 (x86_xcr0): Likewise.
10686 * i387-fp.h (i387_cache_to_xsave): Likewise.
10687 (i387_xsave_to_cache): Likewise.
10688 (x86_xcr0): Likewise.
10690 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10691 * linux-crisv32-low.c (target_regsets): Likewise.
10692 * linux-m68k-low.c (target_regsets): Likewise.
10693 * linux-mips-low.c (target_regsets): Likewise.
10694 * linux-ppc-low.c (target_regsets): Likewise.
10695 * linux-s390-low.c (target_regsets): Likewise.
10696 * linux-sh-low.c (target_regsets): Likewise.
10697 * linux-sparc-low.c (target_regsets): Likewise.
10698 * linux-xtensa-low.c (target_regsets): Likewise.
10700 * linux-low.c: Include <sys/uio.h>.
10701 (regsets_fetch_inferior_registers): Support nt_type.
10702 (regsets_store_inferior_registers): Likewise.
10703 (linux_process_qsupported): New.
10704 (linux_target_ops): Add linux_process_qsupported.
10706 * linux-low.h (regset_info): Add nt_type.
10707 (linux_target_ops): Add process_qsupported.
10709 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10711 (init_registers_i386_avx_linux): New.
10712 (init_registers_amd64_avx_linux): Likewise.
10713 (xmltarget_i386_linux_no_xml): Likewise.
10714 (xmltarget_amd64_linux_no_xml): Likewise.
10715 (PTRACE_GETREGSET): Likewise.
10716 (PTRACE_SETREGSET): Likewise.
10717 (x86_fill_xstateregset): Likewise.
10718 (x86_store_xstateregset): Likewise.
10719 (use_xml): Likewise.
10720 (x86_linux_update_xmltarget): Likewise.
10721 (x86_linux_process_qsupported): Likewise.
10722 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10723 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10724 init_registers_i386_linux here. Call
10725 x86_linux_update_xmltarget.
10726 (the_low_target): Add x86_linux_process_qsupported.
10728 * server.c (handle_query): Call target_process_qsupported.
10730 * target.h (target_ops): Add process_qsupported.
10731 (target_process_qsupported): New.
10733 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10735 * inferiors.c (add_thread): Set last_status kind to
10736 TARGET_WAITKIND_IGNORE.
10737 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10738 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10739 (linux_wait_1): Move `thread' local definition to block that uses
10740 it. Don't NULL initialize `event_child'.
10741 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10742 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10743 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10745 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10747 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10748 an extended waitstatus, or by a watchpoint.
10749 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10750 thread was stepping or has been stopped by a watchpoint.
10752 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10754 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10755 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10756 of another, then delete the previous, and validate all
10758 (validate_inserted_breakpoint): New.
10759 (delete_disabled_breakpoints): New.
10760 (validate_breakpoints): New.
10761 (check_mem_read): Validate breakpoints before trusting their
10762 shadow. Delete disabled breakpoints.
10763 (check_mem_write): Validate breakpoints before trusting they
10764 should be inserted. Delete disabled breakpoints.
10765 * mem-break.h (validate_breakpoints):
10766 * server.c (handle_query): Validate breakpoints when we see a
10769 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10771 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10772 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10773 if we could tell there's a GDB breakpoint at stop_pc.
10774 (need_step_over_p): Don't do a step over if we find a GDB
10775 breakpoint at the resume PC.
10777 * mem-break.c (struct raw_breakpoint): New.
10778 (enum bkpt_type): New type `gdb_breakpoint'.
10779 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10780 fields. New field `raw'.
10781 (find_raw_breakpoint_at): New.
10782 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10783 breakpoint instead.
10784 (set_breakpoint_at): Adjust.
10785 (delete_raw_breakpoint): New.
10786 (release_breakpoint): New.
10787 (delete_breakpoint): Rename to...
10788 (delete_breakpoint_1): ... this. Add proc parameter. Use
10789 release_breakpoint. Return ENOENT.
10790 (delete_breakpoint): Reimplement.
10791 (find_breakpoint_at): Delete.
10792 (find_gdb_breakpoint_at): New.
10793 (delete_breakpoint_at): Delete.
10794 (set_gdb_breakpoint_at): New.
10795 (delete_gdb_breakpoint_at): New.
10796 (gdb_breakpoint_here): New.
10797 (set_reinsert_breakpoint): Use release_breakpoint.
10798 (uninsert_breakpoint): Rename to ...
10799 (uninsert_raw_breakpoint): ... this.
10800 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10801 (reinsert_raw_breakpoint): Change parameter type to
10803 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10805 (check_breakpoints): Adjust. Use release_breakpoint.
10806 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10807 (breakpoint_inserted_here): Ditto.
10808 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10809 Don't trust the breakpoint's shadow if it is not inserted.
10810 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10811 (delete_all_breakpoints): Adjust.
10812 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10813 use delete_breakpoint_1.
10815 * mem-break.h (breakpoints_supported): Delete declaration.
10816 (set_gdb_breakpoint_at): Declare.
10817 (gdb_breakpoint_here): Declare.
10818 (delete_breakpoint_at): Delete.
10819 (delete_gdb_breakpoint_at): Declare.
10821 * server.h (struct raw_breakpoint): Forward declare.
10822 (struct process_info): New field `raw_breakpoints'.
10824 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10827 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10829 * linux-low.c (status_pending_p_callback): Fix comment.
10830 (linux_wait_for_event_1): Move most of the internal breakpoint
10831 handling from here...
10832 (linux_wait_1): ... to here.
10833 (count_events_callback): New.
10834 (select_singlestep_lwp_callback): New.
10835 (select_event_lwp_callback): New.
10836 (cancel_breakpoints_callback): New.
10837 (select_event_lwp): New.
10838 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10839 priority to all LWPs that have had events that should be reported
10840 to the client. Cancel breakpoints when about to reporting the
10841 event to the client, not while stopping lwps. No longer cancel
10842 finished single-steps here.
10843 (cancel_finished_single_step): Delete.
10844 (cancel_finished_single_steps): Delete.
10846 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10848 * mem-break.c (enum bkpt_type): New.
10849 (struct breakpoint): New field `type'.
10850 (set_breakpoint_at): Change return type to struct breakpoint
10851 pointer. Set type to `other_breakpoint' by default.
10852 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10853 in the breakpoint list.
10854 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10855 (reinsert_breakpoint): Rename to ...
10856 (reinsert_raw_breakpoint): ... this.
10857 (reinsert_breakpoints_at): Adjust.
10858 * mem-break.h (struct breakpoint): Declare.
10859 (set_breakpoint_at): Change return type to struct breakpoint
10862 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10864 * server.c (handle_query): Assign, not compare.
10866 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10868 Teach linux gdbserver to step-over-breakpoints.
10870 * linux-low.c (can_hardware_single_step): New.
10871 (supports_breakpoints): New.
10872 (handle_extended_wait): If stopping threads, read the stop pc of
10873 the new cloned LWP.
10875 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10876 low target doesn't support retrieving the PC.
10877 (add_lwp): Set last_resume_kind to resume_continue.
10878 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10879 (linux_attach): Don't clear stop_expected. Set the lwp's
10880 last_resume_kind to resume_stop.
10881 (linux_detach_one_lwp): Don't check for removed breakpoints.
10882 (check_removed_breakpoint): Delete.
10883 (status_pending_p): Rename to ...
10884 (status_pending_p_callback): ... this. Don't check for removed
10885 breakpoints. Don't consider threads that are stopped from GDB's
10887 (linux_wait_for_lwp): Always read the stop_pc here.
10888 (cancel_breakpoint): New.
10889 (step_over_bkpt): New global.
10890 (linux_wait_for_event_1): Implement stepping over breakpoints.
10891 (gdb_wants_lwp_stopped): New.
10892 (gdb_wants_all_stopped): New.
10893 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10894 single-step traps here. Store the thread's last reported target
10896 (send_sigstop): Don't clear stop_expected. Always set it,
10898 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10899 (cancel_finished_single_step): New.
10900 (cancel_finished_single_steps): New.
10901 (wait_for_sigstop): Don't cancel finished single-step traps here.
10902 (linux_resume_one_lwp): Don't check for removed breakpoints.
10903 Don't set `step' on non-hardware step archs.
10904 (linux_set_resume_request): Ignore resume_stop requests if already
10905 stopping or stopped. Set the lwp's last_resume_kind.
10906 (resume_status_pending_p): Don't check for removed breakpoints.
10907 (need_step_over_p): New.
10908 (start_step_over): New.
10909 (finish_step_over): New.
10910 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10911 requests. Clear the thread's last reported target waitstatus.
10912 Don't use the `suspended' flag. Don't consider pending breakpoints.
10913 (linux_resume): Start a step-over if necessary.
10914 (proceed_one_lwp): New.
10915 (proceed_all_lwps): New.
10916 (unstop_all_lwps): New.
10917 * linux-low.h (struct lwp_info): Rewrite comment for the
10918 `suspended' flag. Add the `stop_pc' field. Delete the
10919 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10920 Add `'last_resume_kind' and `need_step_over' fields.
10921 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10922 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10923 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10924 (set_raw_breakpoint_at): New.
10925 (set_breakpoint_at): Rewrite to use it.
10926 (reinsert_breakpoint_handler): Delete.
10927 (set_reinsert_breakpoint): New.
10928 (reinsert_breakpoint_by_bp): Delete.
10929 (delete_reinsert_breakpoints): New.
10930 (uninsert_breakpoint): Rewrite.
10931 (uninsert_breakpoints_at): New.
10932 (reinsert_breakpoint): Rewrite.
10933 (reinsert_breakpoints_at): New.
10934 (check_breakpoints): Rewrite.
10935 (breakpoint_here): New.
10936 (breakpoint_inserted_here): New.
10937 (check_mem_read): Adjust.
10938 * mem-break.h (breakpoints_supported, breakpoint_here)
10939 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10940 (reinsert_breakpoint_by_bp): Delete declaration.
10941 (delete_reinsert_breakpoints): Declare.
10942 (reinsert_breakpoint): Delete declaration.
10943 (reinsert_breakpoints_at): Declare.
10944 (uninsert_breakpoint): Delete declaration.
10945 (uninsert_breakpoints_at): Declare.
10946 (check_breakpoints): Adjust prototype.
10947 * server.h: Adjust include order.
10948 (struct thread_info): Declare here. Add a `last_status' field.
10950 2010-03-23 Michael Snyder <msnyder@vmware.com>
10952 * server.c (crc32): New function.
10953 (handle_query): Add handling for 'qCRC:' request.
10955 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10957 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10958 lwp had been stopped by a watchpoint.
10960 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10962 * server.h (internal_error): Declare.
10963 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10964 * utils.c (internal_error): New function.
10966 2010-03-15 Andreas Schwab <schwab@redhat.com>
10968 * configure.srv: Fix typo setting srv_regobj.
10970 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10972 * linux-low.c (fetch_register): Avoid passing a non string literal
10974 (usr_store_inferior_registers): Ditto.
10976 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10978 * linux-low.c (linux_write_memory): Bail out early if peeking
10981 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10983 * linux-low.h (struct lwp_info): New fields
10984 `stopped_by_watchpoint' and `stopped_data_address'.
10985 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10986 here, and cache them in the lwp object.
10987 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10989 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10991 (linux_stopped_by_watchpoint): Rewrite.
10992 (linux_stopped_data_address): Rewrite.
10994 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10996 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10997 switching the current inferior, not before.
10999 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11001 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11002 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11003 i386-linux.c and amd64-linux.c.
11004 (reg-i386.o): Removed.
11005 (reg-i386.c): Likewise.
11006 (reg-i386-linux.o): Likewise.
11007 (reg-i386-linux.c): Likewise.
11008 (reg-x86-64.o): Likewise.
11009 (reg-x86-64.c): Likewise.
11010 (reg-x86-64-linux.o): Likewise.
11011 (reg-x86-64-linux.c): Likewise.
11013 (i386.c): Likewise.
11014 (i386-linux.o): Likewise.
11015 (i386-linux.c): Likewise.
11016 (amd64.o): Likewise.
11017 (amd64.c): Likewise.
11018 (amd64-linux.o): Likewise.
11019 (amd64-linux.c): Likewise.
11021 * configure.srv (srv_i386_regobj): New.
11022 (srv_i386_linux_regobj): Likewise.
11023 (srv_amd64_regobj): Likewise.
11024 (srv_amd64_linux_regobj): Likewise.
11025 (srv_i386_32bit_xmlfiles): Likewise.
11026 (srv_i386_64bit_xmlfiles): Likewise.
11027 (srv_i386_xmlfiles): Likewise.
11028 (srv_amd64_xmlfiles): Likewise.
11029 (srv_i386_linux_xmlfiles): Likewise.
11030 (srv_amd64_linux_xmlfiles): Likewise.
11031 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11032 srv_xmlfiles to $srv_i386_xmlfiles.
11033 (i[34567]86-*-mingw32ce*): Likewise.
11034 (i[34567]86-*-mingw*): Likewise.
11035 (i[34567]86-*-nto*): Likewise.
11036 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11037 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11038 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11039 (x86_64-*-linux*): Likewise.
11041 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11042 (init_registers_amd64_linux): New.
11043 (x86_arch_setup): Replace init_registers_x86_64_linux with
11044 init_registers_amd64_linux.
11046 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11048 * configure.ac: Check for libdl. If it is not available link against
11049 static libthread_db.
11050 * configure: Regenerate.
11052 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11056 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11057 handing a read watchpoint.
11058 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11060 2010-02-12 Doug Evans <dje@google.com>
11062 * linux-low.c (linux_supports_tracefork_flag): Document.
11063 (linux_look_up_symbols): Add comment.
11065 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11067 * regcache.c (supply_register): Clear regcache if buf is NULL.
11069 2010-02-02 Nicolas Roche <roche@sourceware.org>
11070 Joel Brobecker <brobecker@adacore.com>
11072 * inferiors.c (find_inferior): Add function documentation.
11073 (unloaded_dll): Handle the case where the unloaded dll has not
11074 been previously registered in the dll list.
11076 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11078 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11079 (thumb2_breakpoint): New.
11080 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11082 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11084 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11085 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11088 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11090 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11092 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11094 * linux-s390-low.c (s390_collect_ptrace_register)
11095 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11097 2010-01-21 Doug Evans <dje@google.com>
11099 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11100 (PTRACE_ARG4_TYPE): New macro.
11101 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11102 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11103 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11104 (usr_store_inferior_registers): Ditto.
11105 (linux_read_memory, linux_write_memory): Ditto.
11106 (linux_test_for_tracefork): Ditto.
11108 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11109 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11111 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11113 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11116 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11118 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11119 prototype to take a regcache. Adjust.
11121 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11123 * regcache.h (struct thread_info): Forward declare.
11124 (struct regcache): New.
11125 (new_register_cache): Adjust prototype.
11126 (get_thread_regcache): Declare.
11127 (free_register_cache): Adjust prototype.
11128 (registers_to_string, registers_from_string): Ditto.
11129 (supply_register, supply_register_by_name, collect_register)
11130 (collect_register_as_string, collect_register_by_name): Ditto.
11131 * regcache.c (struct inferior_regcache_data): Delete.
11132 (get_regcache): Rename to ...
11133 (get_thread_regcache): ... this. Adjust. Switch inferior before
11134 fetching registers.
11135 (regcache_invalidate_one): Adjust.
11136 (regcache_invalidate): Fix prototype.
11137 (new_register_cache): Return the new register cache.
11138 (free_register_cache): Change prototype.
11139 (realloc_register_cache): Adjust.
11140 (registers_to_string): Change prototype to take a regcache. Adjust.
11141 (registers_from_string): Ditto.
11142 (register_data): Ditto.
11143 (supply_register): Ditto.
11144 (supply_register_by_name): Ditto.
11145 (collect_register): Ditto.
11146 (collect_register_as_string): Ditto.
11147 (collect_register_by_name): Ditto.
11148 * server.c (process_serial_event): Adjust.
11149 * linux-low.h (regset_fill_func, regset_store_func): Change
11151 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11153 * linux-low.c (get_stop_pc): Adjust.
11154 (check_removed_breakpoint): Adjust.
11155 (linux_wait_for_event): Adjust.
11156 (linux_resume_one_lwp): Adjust.
11157 (fetch_register): Add regcache parameter. Adjust.
11158 (usr_store_inferior_registers): Ditto.
11159 (regsets_fetch_inferior_registers): Ditto.
11160 (regsets_store_inferior_registers): Ditto.
11161 (linux_fetch_registers, linux_store_registers): Ditto.
11162 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11164 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11166 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11167 prototype to take a regcache.
11168 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11169 * remote-utils.c (convert_ascii_to_int, outreg)
11170 (prepare_resume_reply): Change prototype to take a regcache.
11172 * target.h (struct target_ops) <fetch_registers, store_registers>:
11173 Change prototype to take a regcache.
11174 (fetch_inferior_registers, store_inferior_registers): Change
11175 prototype to take a regcache. Adjust.
11176 * proc-service.c (ps_lgetregs): Adjust.
11177 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11178 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11179 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11180 take a regcache. Adjust.
11181 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11182 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11183 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11184 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11185 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11186 (cris_cannot_fetch_register):
11187 (cris_breakpoint_at): Change prototype to take a regcache.
11189 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11190 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11191 to take a regcache. Adjust.
11192 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11194 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11195 take a regcache. Adjust.
11196 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11197 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11198 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11199 * linux-mips-low.c (mips_get_pc):
11200 (mips_set_pc): Change prototype to take a regcache. Adjust.
11201 (mips_reinsert_addr): Adjust.
11202 (mips_collect_register): Change prototype to take a regcache.
11204 (mips_supply_register):
11205 (mips_collect_register_32bit, mips_supply_register_32bit)
11206 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11207 (mips_store_fpregset): Ditto.
11208 * linux-ppc-low.c (ppc_supply_ptrace_register)
11209 (ppc_supply_ptrace_register): Ditto.
11210 (parse_spufs_run): Adjust.
11211 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11212 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11213 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11214 take a regcache. Adjust.
11215 * linux-s390-low.c (s390_collect_ptrace_register)
11216 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11217 (s390_set_pc): Change prototype to take a regcache. Adjust.
11218 (s390_arch_setup): Adjust.
11219 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11220 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11221 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11222 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11223 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11225 (sparc_breakpoint_at): Adjust.
11226 * linux-xtensa-low.c (xtensa_fill_gregset):
11227 (xtensa_store_gregset):
11228 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11229 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11230 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11231 prototype to take a regcache. Adjust.
11232 * win32-arm-low.c (arm_fetch_inferior_register)
11233 (arm_store_inferior_register): Change prototype to take a
11235 * win32-i386-low.c (i386_fetch_inferior_register)
11236 (i386_store_inferior_register): Change prototype to take a
11238 * win32-low.c (child_fetch_inferior_registers)
11239 (child_store_inferior_registers): Change prototype to take a
11241 (win32_wait): Adjust.
11242 (win32_fetch_inferior_registers): Change prototype to take a
11244 (win32_store_inferior_registers): Adjust.
11245 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11246 store_inferior_register>: Change prototype to take a regcache.
11248 2010-01-20 Doug Evans <dje@google.com>
11250 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11252 (linux_wait_for_event1, linux_init_signals): Ditto.
11253 (W_STOPCODE): Provide definition if missing.
11255 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11257 * linux-low.c (linux_core_of_thread): New.
11258 (compare_ints, show_process, list_threads): New.
11259 (linux_qxfer_osdata): Report threads and cores.
11260 (linux_target_op): Register linux_core_of_thread.
11261 * remote-utils.c (prepare_resume_reply): Report the core.
11262 (buffer_xml_printf): Support %d specifier.
11263 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11265 (handle_query): Handle qXfer:threads. Announce availability
11267 * target.h (struct target_ops): New field core_of_thread.
11269 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11271 * Makefile.in (clean): Remove new generated files.
11272 (reg-s390.o, reg-s390.c): Remove rules.
11273 (reg-s390x.o, reg-s390x.c): Likewise.
11274 (s390-linux32.o, s390-linux32.c): Add rules.
11275 (s390-linux64.o, s390-linux64.c): Likewise.
11276 (s390x-linux64.o, s390x-linux64.c): Likewise.
11277 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11278 * linux-s390-low.c: Include <elf.h>.
11279 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11280 (init_registers_s390): Remove prototype.
11281 (init_registers_s390x): Likewise.
11282 (init_registers_s390_linux32): Add prototype.
11283 (init_registers_s390_linux64): Likewise.
11284 (init_registers_s390x_linux64): Likewise.
11285 (s390_num_regs_3264): New define.
11286 (s390_regmap_3264): New global variable.
11287 (s390_cannot_fetch_register): Remove obsolete check.
11288 (s390_cannot_store_register): Likewise.
11289 (s390_collect_ptrace_register): Handle upper/lower register halves.
11290 (s390_supply_ptrace_register): Likewise.
11291 (s390_fill_gregset): Update to register number changes.
11292 (s390_get_hwcap): New routine.
11293 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11294 Install appropriate regmap and register set.
11296 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11298 * server.c (gdbserver_version): Update copyright year to 2010.
11299 * gdbreplay.c (gdbreplay_version): Likewise.
11301 2009-12-28 Doug Evans <dje@google.com>
11303 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11304 elf/external.h. Include <elf.h> instead but only if necessary.
11306 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11308 * linux-low.c (linux_remove_process): Remove `detaching'
11309 parameter. Don't release/detach from thread_db here.
11310 (linux_kill): Release/detach from thread_db here, ...
11311 (linux_detach): ... and here, before actually detaching.
11312 (linux_wait_1): ... and here, when a process exits.
11313 * thread-db.c (any_thread_of): New.
11314 (thread_db_free): Switch the current inferior to a thread of the
11317 2009-12-21 Doug Evans <dje@google.com>
11319 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11321 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11322 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11323 warning ifndef __NR_tkill. Move setting of errno there too.
11324 Delete unnecessary resetting of errno after syscall.
11325 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11327 * configure.ac: Check for dladdr.
11328 * config.in: Regenerate.
11329 * configure: Regenerate.
11330 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11331 (try_thread_db_load): Update.
11333 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11335 2009-12-18 Doug Evans <dje@google.com>
11337 * event-loop.c: Include unistd.h if it exists.
11339 * linux-low.c (my_waitpid): Move definition away from being in
11340 between linux_tracefork_child/linux_test_for_tracefork.
11342 * gdb_proc_service.h (psaddr_t): Fix type.
11343 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11344 signature to match glibc.
11346 2009-12-16 Doug Evans <dje@google.com>
11348 * linux-low.c (linux_read_memory): Fix argument to read.
11350 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11352 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11353 events, don't leave current_inferior pointing at null.
11355 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11357 * win32-low.c (LOG): Delete.
11358 (OUTMSG): Output to stderr.
11359 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11360 on compile time LOG macro.
11361 (win32_wait): Fix debug output.
11363 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11365 * win32-low.c (win32_add_one_solib): If the dll name is
11366 "ntdll.dll", prepend the system directory to the dll path.
11368 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11370 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11372 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11373 Vladimir Prus <vladimir@codesourcery.com>
11375 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11376 * configure.ac: Check for __mcoldfire__ and set
11377 gdb_cv_m68k_is_coldfire.
11378 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11379 reg-cf.o and reg-m68k.o.
11380 * configure: Regenerated.
11382 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11384 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11385 Pass it to thread_db_free.
11386 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11387 proper `detaching' argument to linux_remove_process.
11388 * linux-low.h (thread_db_free): Add `detaching' parameter.
11389 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11391 (thread_db_free): Add `detaching' parameter. Only
11392 call td_ta_clear_event if detaching from process.
11394 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11396 * thread-db.c (thread_db_free): Fix typo.
11398 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11401 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11403 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11405 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11406 with an i686 compiler.
11407 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11409 * configure: Rebuilt.
11411 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11415 * server.c (handle_search_memory_1): Correct read_addr initialization
11416 in loop for searching subsequent chunks.
11418 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11420 * configure.ac: New --with-libthread-db option.
11421 * thread-db.c: Allow direct dependence on libthread_db.
11422 (thread_db_free): Adjust.
11423 * config.in: Regenerate.
11424 * configure: Likewise.
11426 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11429 * thread-db.c (attach_thread): New function.
11430 (maybe_attach_thread): Return success/failure.
11431 (find_new_threads_callback): Adjust.
11432 (thread_db_find_new_threads): Loop until no new threads.
11434 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11436 * proc-service.c (ps_lgetregs): Formatting.
11438 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11440 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11441 * configure.ac: Adjust.
11442 * linux-low.h (struct process_info_private): Move members to struct
11444 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11445 * linux-low.c (linux_remove_process): Adjust.
11446 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11447 * server.c (handle_query): Move code ...
11448 (handle_monitor_command): ... here. New function.
11449 * target.h (struct target_ops): New member.
11450 * thread-db.c (struct thread_db): New.
11451 (libthread_db_search_path): New variable.
11452 (thread_db_create_event, thread_db_enable_reporting)
11453 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11454 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11455 (try_thread_db_load_1, dladdr_to_soname): New functions.
11456 (try_thread_db_load, thread_db_load_search): New functions.
11457 (thread_db_init): Search for libthread_db.
11458 (thread_db_free): New function.
11459 (thread_db_handle_monitor_command): Likewise.
11460 * config.in: Regenerate.
11461 * configure: Regenerate.
11463 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11465 * spu-low.c (spu_kill): Wait for inferior to terminate.
11466 Call clear_inferiors.
11467 (spu_detach): Call clear_inferiors.
11469 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11471 * aclocal.m4: Regenerate.
11472 * config.in: Likewise.
11473 * configure: Likewise.
11475 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11477 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11478 (parse_spufs_run): New function.
11479 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11480 (ppc_breakpoint_at): Handle SPU breakpoints.
11482 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11484 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11485 (SPUFS_MAGIC): Define.
11486 (spu_enumerate_spu_ids): New function.
11487 (linux_qxfer_spu): New function.
11488 (linux_target_ops): Install linux_qxfer_spu.
11490 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11492 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11493 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11494 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11495 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11496 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11497 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11498 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11499 (init_registers_powerpc_cell32l): Add prototype.
11500 (init_registers_powerpc_cell64l): Likewise.
11501 (ppc_arch_setup): Detect Cell/B.E. architecture.
11503 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11505 * Makefile.in (datarootdir): New variable.
11507 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11509 * linux-low.c (linux_write_memory): Update debugging output.
11510 * Makefile.in (clean): Add new descriptions.
11511 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11512 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11513 * configure.srv: Add new files for arm*-*-linux*.
11514 * linux-arm-low.c: Add new declarations.
11515 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11516 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11517 (HWCAP_VFPv3D16): New.
11518 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11519 instead of __IWMMXT__.
11520 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11521 (arm_arch_setup): New.
11522 (target_regsets): Remove #ifdef. Add VFP regset.
11523 (the_low_target): Use arm_arch_setup.
11525 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11527 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11528 the main thread again.
11530 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11532 Adding Neutrino gdbserver.
11533 * configure: Regenerated.
11534 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11535 * configure.srv (i[34567]86-*-nto*): New target.
11536 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11537 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11538 (nto_comctrl) [__QNX__]: New function.
11539 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11541 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11543 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11546 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11547 Pedro Alves <pedro@codesourcery.com>
11549 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11550 don't support CONTEXT_EXTENDED_REGISTERS.
11551 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11552 (the_low_target): Install them.
11553 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11554 failing with ERROR_PIPE_NOT_CONNECTED.
11556 2009-06-30 Doug Evans <dje@google.com>
11557 Pierre Muller <muller@ics.u-strasbg.fr>
11559 Add h/w watchpoint support to x86-linux, win32-i386.
11560 * Makefile.in (SFILES): Add i386-low.c
11561 (i386_low_h): Define.
11562 (i386-low.o): Add dependencies.
11563 (linux-x86-low.o): Add i386-low.h dependency.
11564 (win32-i386-low.o): Ditto.
11565 * i386-low.c: New file.
11566 * i386-low.h: New file.
11567 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11568 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11569 * linux-low.c (linux_add_process): Initialize arch_private.
11570 (linux_remove_process): Free arch_private.
11571 (add_lwp): Initialize arch_private.
11572 (delete_lwp): Free arch_private.
11573 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11575 * linux-low.h (process_info_private): New member arch_private.
11576 (lwp_info): New member arch_private.
11577 (linux_target_ops): New members new_process, new_thread,
11579 (ptid_of): New macro.
11580 * linux-x86-low.c: Include stddef.h, i386-low.h.
11581 (arch_process_info): New struct.
11582 (arch_lwp_info): New struct.
11583 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11584 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11585 (i386_dr_low_get_status): New function.
11586 (x86_insert_point, x86_remove_point): New functions.
11587 (x86_stopped_by_watchpoint): New function.
11588 (x86_stopped_data_address): New function.
11589 (x86_linux_new_process, x86_linux_new_thread): New functions.
11590 (x86_linux_prepare_to_resume): New function.
11591 (the_low_target): Add entries for insert_point, remove_point,
11592 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11594 * server.c (debug_hw_points): New global.
11595 (monitor_show_help): Document set debug-hw-points.
11596 (handle_query): Process "set debug-hw-points".
11597 * server.h (debug_hw_points): Declare.
11598 (paddress): Declare.
11599 * utils.c (NUMCELLS, CELLSIZE): New macros.
11600 (get_sell, xsnprintf, paddress): New functions.
11601 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11602 remove_point, stopped_by_watchpoint, stopped_data_address.
11603 * win32-i386-low.c: Include i386-low.h.
11604 (debug_reg_state): Replaces dr.
11605 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11606 (i386_dr_low_get_status): New function.
11607 (i386_insert_point, i386_remove_point): New functions.
11608 (i386_stopped_by_watchpoint): New function.
11609 (i386_stopped_data_address): New function.
11610 (i386_initial_stuff): Update.
11611 (get_thread_context,set_thread_context,i386_thread_added): Update.
11612 (the_low_target): Add entries for insert_point,
11613 remove_point, stopped_by_watchpoint, stopped_data_address.
11614 * win32-low.c (win32_insert_watchpoint): New function.
11615 (win32_remove_watchpoint): New function.
11616 (win32_stopped_by_watchpoint): New function.
11617 (win32_stopped_data_address): New function.
11618 (win32_target_ops): Add entries for insert_watchpoint,
11619 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11620 * win32-low.h (win32_target_ops): New members insert_point,
11621 remove_point, stopped_by_watchpoint, stopped_data_address.
11623 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11625 * server.c (process_serial_event): Re-return unsupported, not
11626 error, if the type isn't recognized. Re-allow supporting only
11627 insert or remove packets. Also call require_running for
11628 breakpoints. Add missing break statement to default case. Tidy.
11629 * target.h (struct target_ops): Rename insert_watchpoint to
11630 insert_point, and remove_watchpoint to remove_point.
11632 * linux-low.h (struct linux_target_ops): Likewise.
11633 * linux-low.c (linux_insert_watchpoint): Rename to ...
11634 (linux_insert_point): ... this. Adjust.
11635 (linux_remove_watchpoint): Rename to ...
11636 (linux_remove_point): ... this. Adjust.
11637 (linux_target_ops): Adjust.
11638 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11639 (cris_insert_point): ... this.
11640 (cris_remove_watchpoint): Rename to ...
11641 (cris_remove_point): ... this.
11642 (the_low_target): Adjust.
11644 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11646 * server.c (handle_v_kill): Pass signal_pid to
11647 kill_inferior if multi_process is zero.
11649 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11651 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11652 * target.h (target_ops): Comment for *_watchpoint to make it clear
11653 the functions can get types '0' and '1'.
11655 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11657 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11658 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11659 * regcache.c (get_regcache): Likewise.
11660 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11661 * win32-low.c (child_fetch_inferior_registers): Remove check for
11664 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11665 Pedro Alves <pedro@codesourcery.com>
11667 * target.h (struct target_ops) <supports_multi_process>: New
11669 (target_supports_multi_process): New.
11670 * server.c (handle_query): Even if GDB reports support, only
11671 enable multi-process if the target also supports it. Report
11672 multi-process support only if the target backend supports it.
11673 * linux-low.c (linux_supports_multi_process): New function.
11674 (linux_target_ops): Install it as target_supports_multi_process
11677 2009-05-24 Doug Evans <dje@google.com>
11679 Global renaming of find_thread_pid to find_thread_ptid.
11680 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11681 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11682 All callers updated.
11684 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11685 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11688 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11689 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11690 (linux_resume_one_lwp): Ditto.
11692 2009-05-23 Doug Evans <dje@google.com>
11694 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11695 from struct inferior_list_entry * to struct lwp_info *.
11696 All callers updated.
11698 2009-05-13 Doug Evans <dje@google.com>
11700 * linux-x86-low.c: Don't include assert.h.
11701 (x86_siginfo_fixup): Use fatal, not assert.
11702 (x86_arch_setup): Fix comment.
11704 2009-05-12 Doug Evans <dje@google.com>
11706 Biarch support for i386/amd64 gdbserver.
11707 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11708 Add linux-x86-low.c.
11709 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11710 (linux-x86-low.o): Add.
11711 * linux-x86-64-low.c: Delete.
11712 * linux-i386-low.c: Delete.
11713 * linux-x86-low.c: New file.
11714 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11716 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11718 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11719 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11720 (linux_child_pid_to_exec_file): New function.
11721 (elf_64_header_p, elf_64_file_p): New functions.
11722 (siginfo_fixup): New function.
11723 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11724 give target a chance to convert layout.
11725 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11726 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11728 2009-05-07 Doug Evans <dje@google.com>
11730 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11731 (regsets_store_inferior_registers): Ditto.
11733 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11737 * linux-low.c (must_set_ptrace_flags): Delete.
11738 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11740 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11741 `lwp->must_set_ptrace_flags' instead.
11742 (linux_wait_for_event_1): Set ptrace options here.
11743 (linux_wait_1): ... not here.
11745 2009-04-30 Doug Evans <dje@google.com>
11747 * inferiors.c (started_inferior_callback): New function.
11748 (attached_inferior_callback): New function.
11749 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11750 * server.c (print_started_pid, print_attached_pid): New functions.
11751 (detach_or_kill_for_exit): New function.
11752 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11753 * server.h (have_started_inferiors_p): Declare.
11754 (have_attached_inferiors_p): Declare.
11756 * inferiors.c (remove_process): Fix memory leak, free process.
11757 * linux-low.c (linux_remove_process): New function.
11758 (linux_kill): Call it instead of remove_process.
11759 (linux_detach, linux_wait_1): Ditto.
11761 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11763 * configure.srv: Add x86 Windows CE target.
11765 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11767 * inferiors.c (get_thread_process): Make global.
11768 * server.h (get_thread_process): Add prototype.
11769 * thread-db.c (find_one_thread): Use get_thread_process
11770 instead of current_process.
11771 (thread_db_get_tls_address): Do not crash if called when
11772 thread layer is not yet initialized.
11774 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11776 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11777 * spu-low.c (current_tid): Rename to ...
11778 (current_ptid): ... this.
11779 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11780 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11781 ptid_get_lwp (current_ptid) instead of current_tid.
11782 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11783 instead of current_tid. Use find_process_pid to verify pid
11784 argument is valid. Pass proper argument to remove_process.
11785 (spu_thread_alive): Compare current_ptid instead of current_tid.
11786 (spu_resume): Likewise.
11788 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11790 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11793 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11795 Implement the multiprocess extensions, and add linux multiprocess
11798 * server.h (ULONGEST): Declare.
11799 (struct ptid, ptid_t): New.
11800 (minus_one_ptid, null_ptid): Declare.
11801 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11802 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11803 (struct inferior_list_entry): Change `id' type from unsigned from
11805 (struct sym_cache, struct breakpoint, struct
11806 process_info_private): Forward declare.
11807 (struct process_info): Declare.
11808 (current_process): Declare.
11809 (all_processes): Declare.
11810 (initialize_inferiors): Declare.
11811 (add_thread): Adjust to use ptid_t.
11812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11813 (add_process, remove_process, find_thread_pid): Declare.
11814 (find_inferior_id): Adjust to use ptid_t.
11815 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11816 (multi_process): Declare.
11817 (push_event): Adjust to use ptid_t.
11818 (read_ptid, write_ptid): Declare.
11819 (prepare_resume_reply): Adjust to use ptid_t.
11820 (clear_symbol_cache): Declare.
11821 * inferiors.c (all_processes): New.
11822 (null_ptid, minus_one_ptid): New.
11823 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11824 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11825 (add_thread): Change unsigned long to ptid. Remove gdb_id
11827 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11828 (gdb_id_to_thread): Rename to ...
11829 (find_thread_pid): ... this. Change unsigned long to ptid.
11830 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11831 (loaded_dll, pull_pid_from_list): Adjust.
11832 (add_process, remove_process, find_process_pid)
11833 (get_thread_process, current_process, initialize_inferiors): New.
11834 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11835 (struct target_waitstatus) <related_pid>: Ditto.
11836 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11837 return type to int.
11838 (struct target_ops) <join>: Add `pid' argument.
11839 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11840 (struct target_ops) <wait>: Add `ptid' field. Change return type
11842 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11843 (mywait): Add `ptid' argument. Change return type to ptid_t.
11844 (target_pid_to_str): Declare.
11845 * target.c (set_desired_inferior): Adjust to use ptids.
11846 (mywait): Add new `ptid' argument. Adjust.
11847 (target_pid_to_str): New.
11848 * mem-break.h (free_all_breakpoints): Declare.
11849 * mem-break.c (breakpoints): Delelete.
11850 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11851 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11852 to use per-process breakpoint list.
11853 (free_all_breakpoints): New.
11854 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11855 (symbol_cache, all_symbols_looked_up): Delete.
11857 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11859 (prepare_resume_reply): Change ptid argument's type from unsigned
11860 long to ptid_t. Adjust. Implement W;process and X;process.
11861 (free_sym_cache, clear_symbol_cache): New.
11862 (look_up_one_symbol): Adjust to per-process symbol cache. *
11863 * server.c (cont_thread, general_thread, step_thread): Change type
11865 (attached): Delete.
11866 (multi_process): New.
11867 (last_ptid): Change type to ptid_t.
11868 (struct vstop_notif) <ptid>: Change type to ptid_t.
11869 (queue_stop_reply, push_event): Change `ptid' argument's type to
11871 (discard_queued_stop_replies): Add `pid' argument.
11872 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11873 changes. Don't reference the `attached' global.
11874 (attach_inferior): Adjust to mywait interface changes.
11875 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11876 features. Handle and report "multiprocess+". Handle
11878 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11880 (handle_v_kill): New.
11881 (handle_v_stopped): Adjust to use target_pid_to_str.
11882 (handle_v_requests): Allow multiple attaches and runs when
11883 multiprocess extensions are in effect. Handle "vKill".
11884 (myresume): Adjust to use ptids.
11885 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11886 (handle_status): Adjust to discard_queued_stop_replies interface
11888 (first_thread_of, kill_inferior_callback)
11889 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11890 (main): Call initialize_inferiors. Adjust to use ptids, killing
11891 and detaching from all inferiors. Handle multiprocess packet
11893 * linux-low.h: Include gdb_proc_service.h.
11894 (struct process_info_private): New.
11895 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11896 <lwpid_of>: Use ptid_get_lwp.
11897 (get_lwp_thread): Adjust.
11898 (struct lwp_info): Add `dead' member.
11899 (find_lwp_pid): Declare.
11900 * linux-low.c (thread_db_active): Delete.
11901 (new_inferior): Adjust comment.
11902 (inferior_pid): Delete.
11903 (linux_add_process): New.
11904 (handle_extended_wait): Adjust.
11905 (add_lwp): Change unsigned long to ptid.
11906 (linux_create_inferior): Add process to processes table. Adjust
11907 to use ptids. Don't set new_inferior here.
11908 (linux_attach_lwp): Rename to ...
11909 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11910 it. Adjust to use ptids.
11911 (linux_attach_lwp): New.
11912 (linux_attach): Add process to processes table. Don't set
11914 (struct counter): New.
11915 (second_thread_of_pid_p, last_thread_of_process_p): New.
11916 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11917 multiple processes.
11918 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11919 processes. Remove process from process table.
11920 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11921 to multiple processes.
11922 (any_thread_of): New.
11923 (linux_detach): Add `pid' argument, and handle it. Remove process
11924 from processes table.
11925 (linux_join): Add `pid' argument. Handle it.
11926 (linux_thread_alive): Change unsighed long argument to ptid_t.
11927 Consider dead lwps as not being alive.
11928 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11929 threads we're not interested in.
11930 (same_lwp, find_lwp_pid): New.
11931 (linux_wait_for_lwp): Change `pid' argument's type from int to
11933 (linux_wait_for_event): Rename to ...
11934 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11935 from int to ptid_t. Adjust.
11936 (linux_wait_for_event): New.
11937 (linux_wait_1): Add `ptid' argument. Change return type to
11938 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11939 that exit from the process table.
11940 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11942 (mark_lwp_dead): New.
11943 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11944 stopping all threads, mark its main lwp as dead.
11945 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11947 (fetch_register, usr_store_inferior_registers)
11948 (regsets_fetch_inferior_registers)
11949 (regsets_store_inferior_registers, linux_read_memory)
11950 (linux_write_memory): Inline `inferior_pid'.
11951 (linux_look_up_symbols): Adjust to use per-process
11952 `thread_db_active'.
11953 (linux_request_interrupt): Adjust to use ptids.
11954 (linux_read_auxv): Inline `inferior_pid'.
11955 (initialize_low): Don't reference thread_db_active.
11956 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11957 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11958 (ps_getpid): Return the pid of the current inferior.
11959 * thread-db.c (proc_handle, thread_agent): Delete.
11960 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11962 (find_one_thread): Change argument type to ptid_t. Adjust to
11964 (maybe_attach_thread): Adjust to per-process data and ptids.
11965 (thread_db_find_new_threads): Ditto.
11966 (thread_db_init): Ditto.
11967 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11968 processes table. Adjust to use ptids.
11969 (spu_kill, spu_detach): Adjust interface. Remove process from
11971 (spu_join, spu_thread_alive): Adjust interface.
11972 (spu_wait): Adjust interface. Remove process from processes
11973 table. Adjust to use ptids.
11974 * win32-low.c (current_inferior_tid): Delete.
11975 (current_inferior_ptid): New.
11976 (debug_event_ptid): New.
11977 (thread_rec): Take a ptid. Adjust.
11978 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11979 (child_delete_thread): Ditto.
11980 (do_initial_child_stuff): Add `attached' argument. Add process to
11982 (child_fetch_inferior_registers, child_store_inferior_registers):
11984 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11985 (win32_attach): Pass 1 to do_initial_child_stuff.
11986 (win32_kill): Adjust interface. Remove process from processes
11988 (win32_detach): Ditto.
11989 (win32_join): Adjust interface.
11990 (win32_thread_alive): Take a ptid.
11991 (win32_resume): Adjust to use ptids.
11992 (get_child_debug_event): Ditto.
11993 (win32_wait): Adjust interface. Remove exiting process from
11996 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11998 Non-stop mode support.
12000 * server.h (non_stop): Declare.
12001 (gdb_client_data, handler_func): Declare.
12002 (delete_file_handler, add_file_handler, start_event_loop):
12004 (handle_serial_event, handle_target_event, push_event)
12005 (putpkt_notif): Declare.
12006 * target.h (enum resume_kind): New.
12007 (struct thread_resume): Replace `step' field by `kind' field.
12008 (TARGET_WNOHANG): Define.
12009 (struct target_ops) <wait>: Add `options' argument.
12010 <supports_non_stop, async, start_non_stop>: New fields.
12011 (target_supports_non_stop, target_async): New.
12012 (start_non_stop): Declare.
12013 (mywait): Add `options' argument.
12014 * target.c (mywait): Add `options' argument. Print child exit
12015 notifications here.
12016 (start_non_stop): New.
12017 * server.c (non_stop, own_buf, mem_buf): New globals.
12018 (struct vstop_notif): New.
12019 (notif_queue): New global.
12020 (queue_stop_reply, push_event, discard_queued_stop_replies)
12021 (send_next_stop_reply): New.
12022 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12024 (attach_inferior): In non-stop mode, don't wait for the target
12026 (handle_general_set): Handle QNonStop.
12027 (handle_query): When handling qC, return the current general
12028 thread, instead of the first thread of the list.
12029 (handle_query): If the backend supports non-stop mode, include
12030 QNonStop+ in the qSupported query response.
12031 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12033 (handle_v_attach, handle_v_run): Handle non-stop mode.
12034 (handle_v_stopped): New.
12035 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12036 (myresume): Adjust to use resume_kind. Handle non-stop.
12037 (queue_stop_reply_callback): New.
12038 (handle_status): Handle non-stop mode.
12039 (main): Clear non_stop flag on reconnection. Use the event-loop.
12040 Refactor serial protocol handling from here ...
12041 (process_serial_event): ... to this new function. When GDB
12042 selects any thread, select one here. In non-stop mode, wait until
12043 GDB acks all pending events before exiting.
12044 (handle_serial_event, handle_target_event): New.
12045 * remote-utils.c (remote_open): Install remote_desc in the event
12047 (remote_close): Remove remote_desc from the event loop.
12048 (putpkt_binary): Rename to...
12049 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12050 (putpkt_binary): New as wrapper around putpkt_binary_1.
12051 (putpkt_notif): New.
12052 (prepare_resume_reply): In non-stop mode, don't change the
12054 * event-loop.c: New.
12055 * Makefile.in (OBJ): Add event-loop.o.
12056 (event-loop.o): New rule.
12058 * linux-low.h (pid_of): Moved here.
12060 (get_lwp_thread): Use lwpid_of.
12061 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12062 * linux-low.c (pid_of): Delete.
12063 (inferior_pid): Use lwpid_of.
12064 (linux_event_pipe): New.
12065 (target_is_async_p): New.
12067 (handle_extended_wait): Use lwpid_of.
12068 (add_lwp): Don't set lwpid field.
12069 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12070 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12071 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12072 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12073 first. Adjust to linux_wait_for_event interface changes. Use
12075 (linux_detach): Don't delete the main lwp here.
12076 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12077 (status_pending_p): Don't consider explicitly suspended lwps.
12078 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12079 pointer. Add OPTIONS argument. Change return type to int. Use
12080 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12081 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12082 pointer. Add status pointer argument. Return a pid instead of a
12083 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12084 changes. In non-stop mode, don't switch to a random thread.
12085 (linux_wait): Rename to...
12086 (linux_wait_1): ... this. Add target_options argument, and handle
12087 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12088 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12089 clean exit and signal exit code. Don't stop all threads in
12090 non-stop mode. In all-stop mode, only stop all threads when
12091 reporting a stop to GDB. Handle explicit thread stop requests.
12092 (async_file_flush, async_file_mark): New.
12094 (send_sigstop): Use lwpid_of.
12095 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12096 interface changes. In non-stop mode, don't switch to a random
12098 (linux_resume_one_lwp): Use lwpid_of.
12099 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12100 (linux_resume_one_thread): ... this. Handle resume_stop. In
12101 non-stop mode, don't look for pending flag in all threads.
12102 (resume_status_pending_p): Don't consider explicitly suspended
12104 (my_waitpid): Reimplement. Emulate __WALL.
12105 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12107 (sigchld_handler, linux_supports_non_stop, linux_async)
12108 (linux_start_non_stop): New.
12109 (linux_target_ops): Register linux_supports_non_stop, linux_async
12110 and linux_start_non_stop.
12111 (initialize_low): Install SIGCHLD handler.
12112 * thread-db.c (thread_db_create_event, find_one_thread)
12113 (thread_db_get_tls_address): Use lwpid_of.
12114 * win32-low.c (win32_detach): Adjust to use resume_kind.
12115 (win32_wait): Add `options' argument.
12116 * spu-low.c (spu_resume): Adjust to use resume_kind.
12117 (spu_wait): Add `options' argument.
12119 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12121 Decouple target code from remote protocol.
12123 * target.h (enum target_waitkind): New.
12124 (struct target_waitstatus): New.
12125 (struct target_ops) <wait>: Return an unsigned long. Take a
12126 target_waitstatus pointer instead of a char pointer.
12127 (mywait): Likewise.
12128 * target.c (mywait): Change prototype to return an unsigned long.
12129 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12130 * server.h (thread_from_wait, old_thread_from_wait): Delete
12132 (prepare_resume_reply): Change prototype to take a
12134 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12135 (last_status, last_ptid): New.
12136 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12137 pid instead of a signal.
12138 (attach_inferior): Remove "status" and "signal" parameters.
12140 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12142 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12143 (handle_v_requests, myresume): Remove "status" and "signal"
12144 parameters. Adjust.
12145 (handle_status): New.
12146 (main): Delete local `status'. Adjust.
12147 * remote-utils.c: Include target.h.
12148 (prepare_resume_reply): Change prototype to take a
12149 target_waitstatus. Adjust.
12151 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12153 * spu-low.c (spu_wait): Adjust.
12154 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12156 (win32_wait): Adjust.
12158 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12160 * target.h (struct thread_resume): Delete leave_stopped member.
12161 (struct target_ops): Add a `n' argument to the `resume' callback.
12162 * server.c (start_inferior): Adjust.
12163 (handle_v_cont, myresume): Adjust.
12164 * linux-low.c (check_removed_breakpoint): Adjust to resume
12165 interface change, and to removed leave_stopped field.
12166 (resume_ptr): Delete.
12167 (struct thread_resume_array): New.
12168 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12169 resume interface change.
12170 (linux_continue_one_thread, linux_queue_one_thread)
12171 (resume_status_pending_p): Check if the resume field is NULL
12172 instead of checking the leave_stopped member.
12173 (linux_resume): Adjust to the target resume interface change.
12174 * spu-low.c (spu_resume): Adjust to the target resume interface
12176 * win32-low.c (win32_detach, win32_resume): Ditto.
12178 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12180 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12182 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12184 (linux_continue_one_thread): Only preserve the stepping flag if
12185 there's a pending breakpoint.
12187 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12189 * server.c (main): After the inferior having exited, call
12190 remote_close before exiting gdbserver.
12192 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12194 Fix size of FPSCR in Power 7 processors.
12195 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12196 (PPC_FEATURE_HAS_DFP): New #define.
12197 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12200 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12202 * server.c (handle_query) Whitespace and formatting.
12204 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12206 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12207 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12208 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12209 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12210 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12211 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12212 Makefile.in, configure.ac: Fix whitespace throughout.
12213 * configure: Regenerate.
12215 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12217 * inferiors.c (find_inferior): Make it safe for the callback
12218 function to delete the currently iterated inferior.
12220 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12222 * Makefile.in (linuw_low_h): Move higher.
12223 (thread-db.o): Depend on $(linux_low_h).
12225 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12227 Rename "process" to "lwp" throughout.
12229 * linux-low.c (all_processes): Rename to...
12230 (all_lwps): ... this.
12231 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12232 (add_process): Rename to ...
12233 (add_lwp): ... this. Adjust.
12234 (linux_create_inferior): Adjust.
12235 (linux_attach_lwp): Adjust.
12236 (linux_attach): Adjust.
12237 (linux_kill_one_process): Rename to ...
12238 (linux_kill_one_lwp): ... this. Adjust.
12239 (linux_kill): Adjust.
12240 (linux_detach_one_process): Rename to ...
12241 (linux_detach_one_lwp): ... this. Adjust.
12242 (linux_detach): Adjust.
12243 (check_removed_breakpoint): Adjust.
12244 (status_pending_p): Adjust.
12245 (linux_wait_for_process): Rename to ...
12246 (linux_wait_for_lwp): ... this. Adjust.
12247 (linux_wait_for_event): Adjust.
12248 (send_sigstop): Adjust.
12249 (wait_for_sigstop): Adjust.
12250 (stop_all_processes): Rename to ...
12251 (stop_all_lwps): ... this.
12252 (linux_resume_one_process): Rename to ...
12253 (linux_resume_one_lwp): ... this. Adjust.
12254 (linux_set_resume_request, linux_continue_one_thread)
12255 (linux_queue_one_thread, resume_status_pending_p)
12256 (usr_store_inferior_registers, regsets_store_inferior_registers)
12257 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12259 * linux-low.h (get_process): Rename to ...
12260 (get_lwp): ... this. Adjust.
12261 (get_thread_process): Rename to ...
12262 (get_thread_lwp): ... this. Adjust.
12263 (get_process_thread): Rename to ...
12264 (get_lwp_thread): ... this. Adjust.
12265 (struct process_info): Rename to ...
12266 (struct lwp_info): ... this.
12267 (all_processes): Rename to ...
12268 (all_lwps): ... this.
12269 * proc-service.c (ps_lgetregs): Adjust.
12270 * thread-db.c (thread_db_create_event, find_one_thread)
12271 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12273 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12275 * server.c (handle_query): Handle "qAttached".
12277 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12279 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12280 GPLv3, update license URL.
12282 2009-03-01 Doug Evans <dje@google.com>
12284 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12285 (server_h): Add gdb_signals.h.
12286 (signals.o): Update.
12287 * server.h (target_signal_from_host,target_signal_to_host_p)
12288 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12290 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12292 * remote-utils.c (getpkt): Also generate remote-debug
12293 information if noack_mode is set.
12295 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12297 * server.c (handle_query): Report qXfer:siginfo:read and
12298 qXfer:siginfo:write as supported and handle them.
12299 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12300 * linux-low.c (linux_xfer_siginfo): New.
12301 (linux_target_ops): Set it.
12303 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12305 * server.c (gdbserver_usage): Mention --remote-debug.
12306 (main): Accept '--remote-debug' switch.
12308 2009-01-18 Doug Evans <dje@google.com>
12310 * regcache.c (new_register_cache): No need to check result of xcalloc.
12311 * server.c (handle_search_memory): Back out calls to xmalloc,
12312 result is checked and error is returned to user upon failure.
12313 (handle_query): Ditto. Add more checks for result of malloc.
12314 (handle_v_cont): Check result of malloc, report error back to
12316 (handle_v_run): Ditto. Call freeargv.
12317 * server.h (freeargv): Declare.
12318 * utils.c (freeargv): New fn.
12320 2009-01-15 Doug Evans <dje@google.com>
12322 * gdbreplay.c (perror_with_name): Make arg const char *.
12323 * server.h (target_signal_to_name): Make return type const char *.
12324 * thread-db.c (thread_db_err_str): Make return type const char *.
12325 * utils.c (perror_with_name): Make arg const char *.
12327 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12329 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12330 when handling a EXIT_PROCESS_DEBUG_EVENT.
12332 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12334 * gdbreplay.c (gdbreplay_version): Update copyright year.
12335 * server.c (gdbserver_version): Likewise.
12337 2009-01-05 Doug Evans <dje@google.com>
12339 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12340 (handle_extended_wait): Improve comment.
12342 2008-12-13 Doug Evans <dje@google.com>
12344 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12345 * server.h (ATTR_MALLOC): New macro.
12346 (xmalloc,xcalloc,xstrdup): Declare.
12347 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12348 * inferiors.c: Ditto.
12349 * linux-low.c: Ditto.
12350 * mem-break.c: Ditto.
12351 * regcache.c: Ditto.
12352 * remote-utils.c: Ditto.
12355 * win32-low.c: Ditto.
12357 2008-12-12 Doug Evans <dje@google.com>
12359 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12360 in debugging printf.
12362 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12364 2008-12-09 Doug Evans <dje@google.com>
12366 * linux-low.h (struct process_info): Delete member tid, unused.
12367 * thread-db.c (find_one_thread): Update.
12368 (maybe_attach_thread): Update.
12370 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12372 * target.h (struct target_ops): Add qxfer_osdata member.
12373 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12375 (linux_qxfer_osdata): New functions.
12376 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12378 * server.c (handle_query): Handle "qXfer:osdata:read:".
12379 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12380 (buffer_xml_printf): New functions.
12381 * server.h (struct buffer): New.
12382 (buffer_grow_str, buffer_grow_str0): New macros.
12383 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12384 (buffer_xml_printf): Declare.
12386 2008-11-24 Doug Evans <dje@google.com>
12388 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12390 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12392 * server.c (handle_v_run): Always use the supplied argument list.
12394 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12396 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12397 (xtensa_regmap_table): Add entry for scompare1.
12399 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12401 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12402 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12403 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12404 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12405 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12406 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12407 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12408 XML target descriptions.
12409 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12410 when inferior is running on an ISA 2.05 or later processor. Add
12411 special case to return offset for full 64-bit slot of FPSCR when
12414 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12416 * Makefile.in (SFILES, clean): Added sparc64 files.
12417 (reg-sparc64.o, reg-sparc64.c): New.
12418 * configure.srv (sparc*-*-linux*): New configuration.
12419 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12420 syscall arguments for SPARC.
12421 (regsets_store_inferior_registers): Likewise.
12422 * linux-sparc-low.c: New file.
12424 2008-10-21 Doug Evans <dje@google.com>
12426 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12427 (READLINE_DIR,READLINE_DEP): Delete.
12428 (INTERNAL_CFLAGS): Update.
12429 (LINTFLAGS): Update.
12431 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12433 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12434 whole argv from the last run, not just argv[0].
12436 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12438 * regcache.c (new_register_cache): Return NULL if the register
12439 cache size isn't known yet.
12440 (free_register_cache): Avoid dereferencing a NULL regcache.
12442 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12444 * configure.srv: Merge MIPS and MIPS64.
12446 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12448 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12450 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12452 * Makefile.in: Add required vsx dependencies.
12454 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12455 Declare init_registers_powerpc_vsx32l.
12456 Declare init_registers_powerpc_vsx64l.
12457 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12458 (ppc_arch_setup): Check for VSX in hwcap.
12459 (ppc_fill_vsxregset): New function.
12460 (ppc_store_vsxregset): New function.
12461 Add new VSX entry in regset_info target_regsets.
12463 * configure.srv: Add new VSX dependencies.
12465 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12467 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12468 (remote_open): Set or clear transport_is_reliable.
12469 (putpkt_binary): Don't expect acks in noack mode.
12470 (getpkt): Don't send ack/nac in noack mode.
12471 * server.c (handle_general_set): Handle QStartNoAckMode.
12472 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12474 (main): Reset noack_mode on every connection.
12475 * server.h (noack_mode): Declare.
12477 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12479 * Makefile.in (GDBREPLAY_OBS): New variable.
12480 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12482 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12483 Daniel Jacobowitz <dan@codesourcery.com>
12485 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12486 (usr_store_inferior_registers): Likewise.
12487 (regsets_store_inferior_registers): Likewise.
12489 2008-07-31 Rolf Jansen <rj@surtec.com>
12490 Pedro Alves <pedro@codesourcery.com>
12492 * configure.ac: Check for memmem declaration.
12493 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12494 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12495 (disable_packet_qfThreadInfo): Unconditionally compile.
12496 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12497 * configure, config.in: Regenerate.
12499 2008-07-28 Doug Kwan <dougkwan@google.com>
12501 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12502 (linux_write_memory): Remove declaration of errno.
12504 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12506 * linux-low.c (handle_extended_wait): Do not use "status"
12507 variable uninitialized.
12509 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12511 * server.c (handle_v_attach): Inhibit reporting dll changes.
12513 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12515 * remote-utils.c (prepare_resume_reply): If requested, don't
12516 output "thread:TID" in the T stop reply.
12518 * server.c (disable_packet_vCont, disable_packet_Tthread)
12519 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12520 (handle_query): If requested, disable support for qC, qfThreadInfo
12522 (handle_v_requests): If requested, disable support for vCont.
12523 (gdbserver_show_disableable): New.
12524 (main): Handle --disable-packet and --disable-packet=LIST.
12526 * server.h (disable_packet_vCont, disable_packet_Tthread)
12527 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12529 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12531 * server.c (gdbserver_usage): Mention --version.
12533 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12535 * Makefile.in (gdbreplay.o): New rule.
12537 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12539 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12540 message, not gdbserver.
12542 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12543 Nathan Sidwell <nathan@codesourcery.com>
12544 Joseph Myers <joseph@codesourcery.com>
12546 * acinclude.m4: Include ../../config/acx.m4.
12547 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12548 * configure, config.in: Regenerate.
12549 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12550 * server.c (gdbserver_version): Print PKGVERSION.
12551 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12552 (main): Adjust gdbserver_usage calls.
12553 * gdbreplay.c (version, host_name): Add declarations.
12554 (gdbreplay_version, gdbreplay_usage): New.
12555 (main): Accept --version and --help options.
12557 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12559 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12560 (arm_breakpoint_at): Handle Thumb.
12561 (the_low_target): Add comment.
12563 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12565 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12567 2008-05-09 Doug Evans <dje@google.com>
12569 * server.h (decode_search_memory_packet): Declare.
12570 * remote-utils.c (decode_search_memory_packet): New fn.
12571 * server.c (handle_search_memory_1): New fn.
12572 (handle_search_memory): New fn.
12573 (handle_query): Process qSearch:memory packets.
12575 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12577 * regcache.c (registers_length): Remove.
12578 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12579 full register packet.
12580 * regcache.h (registers_length): Remove prototype.
12581 * server.h (PBUFSIZ): Define to 16384.
12583 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12585 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12586 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12587 powerpc-64l.o, and powerpc-altivec64l.o.
12588 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12589 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12590 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12591 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12592 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12595 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12596 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12597 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12598 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12599 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12600 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12601 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12602 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12603 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12604 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12607 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12608 (init_registers_powerpc_32l): ... this new prototype.
12609 (init_registers_powerpc_32): Remove, replace by ...
12610 (init_registers_powerpc_altivec32l): ... this new prototype.
12611 (init_registers_powerpc_e500): Remove, replace by ...
12612 (init_registers_powerpc_e500l): ... this new prototype.
12613 (init_registers_ppc64): Remove, replace by ...
12614 (init_registers_powerpc_64l): ... this new prototype.
12615 (init_registers_powerpc_64): Remove, replace by ...
12616 (init_registers_powerpc_altivec64l): ... this new prototype.
12617 (ppc_num_regs): Set to 73.
12618 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12619 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12620 (ppc_cannot_store_register): Handle orig_r3 and trap.
12621 (ppc_arch_setup): Update init_registers_... calls.
12622 (ppc_fill_gregset): Handle orig_r3 and trap.
12624 * inferiors.c (clear_inferiors): Reset current_inferior.
12626 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12628 * acinclude.m4: Add override.m4.
12629 * configure: Regenerate.
12631 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12633 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12634 initial call to init_register_ppc64.
12636 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12638 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12639 single powerpc*-*-linux* case.
12640 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12642 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12644 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12645 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12647 * linux-ppc-low.c: Include <elf.h>.
12648 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12649 (ppc_hwcap): New global variable.
12650 (ppc_regmap): Remove __SPE__ #ifdef sections.
12651 (ppc_regmap_e500): New global variable.
12652 (ppc_cannot_store_register): Update __SPE__ special case.
12653 (ppc_get_hwcap): New function.
12654 (ppc_arch_setup): Use it to determine whether inferior supports
12655 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12656 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12657 Do not access registers if target does not support AltiVec.
12658 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12659 Do not access registers if target does not support SPE.
12660 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12662 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12664 * linux-low.c (disabled_regsets, num_regsets): New.
12665 (use_regsets_p): Delete.
12666 (linux_wait_for_process): Clear disabled_regsets.
12667 (regsets_fetch_inferior_registers): Check and set it.
12668 (regsets_store_inferior_registers): Likewise.
12669 (linux_fetch_registers, linux_store_registers): Do not use
12671 (initialize_low): Allocate disabled_regsets.
12673 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12675 * Makefile.in (LIBOBJS): New.
12676 (OBS): Use LIBOBJS.
12677 (memmem.o): New rule.
12678 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12679 * configure: Regenerated.
12681 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12683 * server.c (handle_query): Never return "unsupported" for
12684 qXfer:features:read queries.
12686 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12688 * server.c (get_features_xml): Fix inverted condition.
12689 (handle_query): Always support qXfer:feature:read.
12691 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12693 * server.c (wrapper_argv): New.
12694 (start_inferior): Handle wrapper_argv. If set, expect an extra
12696 (gdbserver_usage): Document --wrapper.
12697 (main): Parse --wrapper.
12699 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12701 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12702 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12703 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12704 (ppc_set_pc): Likewise.
12705 (ppc_arch_setup): New function.
12706 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12707 of collect_register.
12708 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12710 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12712 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12713 instead of linux-ppc64-low.o.
12714 * linux-ppc64-low.c: Remove file.
12715 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12716 (linux-ppc64-low.o): Remove rule.
12718 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12719 (init_registers_powerpc_64): Likewise.
12720 (ppc_regmap): Conditionally define depending on __powerpc64__.
12721 (ppc_cannot_store_register): Do not special-case "fpscr" when
12722 compiled on __powerpc64__.
12723 (ppc_collect_ptrace_register): New function.
12724 (ppc_supply_ptrace_register): New function.
12725 (ppc_breakpoint): Change type to "unsigned int".
12726 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12727 (the_low_target): Conditionally provide initializers for the
12728 arch_setup member depending on __powerpc64__. Install
12729 collect_ptrace_register and supply_ptrace_register members.
12731 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12733 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12734 * server.c (gdbserver_xmltarget): Define.
12735 (get_features_xml): Use it to replace "target.xml" and arch_string.
12737 * configure.srv: Remove srv_xmltarget. Add XML files that were
12738 mentioned there to srv_xmlfiles instead. Remove conditional tests
12739 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12740 srv_xmlfiles and srv_regobj to include all possible choices.
12741 * configure.ac (srv_xmltarget): Remove.
12742 (srv_xmlfiles): Do not add "target.xml".
12743 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12744 checks for supplementary target information.
12745 * configure: Regenerate.
12746 * Makefile.in (XML_TARGET): Remove.
12747 (target.xml): Remove rule.
12748 (clean): Do not clean up target.xml.
12749 (.PRECIOUS): Do not mention target.xml.
12751 * target.h (struct target_ops): Remove arch_string member.
12752 * linux-low.c (linux_arch_string): Remove.
12753 (linux_target_ops): Remove arch_string initializer.
12754 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12755 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12756 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12757 * spu-low.c (spu_arch_string): Remove.
12758 (spu_target_ops): Remove arch_string initializer.
12759 * win32-low.c (win32_arch_string): Remove.
12760 (win32_target_ops): Remove arch_string initializer.
12761 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12762 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12763 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12765 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12767 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12768 by collect_ptrace_register and supply_ptrace_register hooks.
12769 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12770 instead of checking for the_low_target.left_pad_xfer.
12771 (usr_store_inferior_registers): Use collect_ptrace_register callback
12772 instead of checking for the_low_target.left_pad_xfer.
12774 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12775 (s390_supply_ptrace_register): Likewise.
12776 (s390_fill_gregset): Call s390_collect_ptrace_register.
12777 (the_low_target): Update.
12779 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12780 (ppc_supply_ptrace_register): Likewise.
12781 (the_low_target): Update.
12783 * linux-i386-low.c (the_low_target): Update.
12784 * linux-x86-64-low.c (the_low_target): Update.
12786 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12788 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12789 reg-s390.o and reg-s390x.o.
12791 * linux-low.c (new_inferior): New global variable.
12792 (linux_create_inferior, linux_attach): Set it.
12793 (linux_wait_for_process): Call the_low_target.arch_setup after the
12794 target has stopped for the first time.
12795 (initialize_low): Do not call the_low_target.arch_setup.
12797 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12798 (s390_set_pc): Likewise.
12799 (s390_arch_setup): New function.
12800 (the_low_target): Use s390_arch_setup as arch_setup routine.
12802 * regcache.c (realloc_register_cache): New function.
12803 (set_register_cache): Call it for each existing regcache.
12805 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12807 * server.h (init_registers): Remove prototype.
12809 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12810 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12811 instead of init_registers ().
12812 * linux-arm-low.c (init_registers_arm): Add prototype.
12813 (init_registers_arm_with_iwmmxt): Likewise.
12814 (the_low_target): Add initializer for arch_setup field.
12815 * linux-cris-low.c (init_registers_cris): Add prototype.
12816 (the_low_target): Add initializer for arch_setup field.
12817 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12818 (the_low_target): Add initializer for arch_setup field.
12819 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12820 (the_low_target): Add initializer for arch_setup field.
12821 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12822 (the_low_target): Add initializer for arch_setup field.
12823 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12824 (the_low_target): Add initializer for arch_setup field.
12825 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12826 (the_low_target): Add initializer for arch_setup field.
12827 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12828 (init_registers_mips64_linux): Likewise.
12829 (the_low_target): Add initializer for arch_setup field.
12830 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12831 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12832 (the_low_target): Add initializer for arch_setup field.
12833 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12834 (init_registers_powerpc_64): Likewise.
12835 (the_low_target): Add initializer for arch_setup field.
12836 * linux-s390-low.c (init_registers_s390): Add prototype.
12837 (init_registers_s390x): Likewise.
12838 (the_low_target): Add initializer for arch_setup field.
12839 * linux-sh-low.c (init_registers_sh): Add prototype.
12840 (the_low_target): Add initializer for arch_setup field.
12841 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12842 (the_low_target): Add initializer for arch_setup field.
12843 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12844 (the_low_target): Add initializer for arch_setup field.
12846 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12847 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12848 instead of init_registers ().
12849 * win32-arm-low.c (init_registers_arm): Add prototype.
12850 (the_low_target): Add initializer for arch_setup field.
12851 * win32-i386-low.c (init_registers_i386): Add prototype.
12852 (the_low_target): Add initializer for arch_setup field.
12854 * spu-low.c (init_registers_spu): Add prototype.
12855 (initialize_low): Call initialie_registers_spu () instead of
12856 initialize_registers ().
12858 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12860 * server.c (handle_v_requests): When handling the vRun and vAttach
12861 packets, if already debugging a process, don't kill it. Return an
12864 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12866 * server.c (handle_query): Correct length check.
12868 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12870 * win32-low.c (do_initial_child_stuff): Add process handle
12871 parameter. Set current_process_handle and current_process_id from the
12872 parameters. Clear globals.
12873 (win32_create_inferior): Don't set current_process_handle and
12874 current_process_id here. Instead pass them on the call to
12875 do_initial_child_stuff.
12876 (win32_attach): Likewise.
12877 (win32_clear_inferiors): New.
12878 (win32_kill): Don't close the current process handle or the
12879 current thread handle here. Instead call win32_clear_inferiors.
12880 (win32_detach): Don't open a new handle to the process. Call
12881 win32_clear_inferiors.
12882 (win32_join): Don't rely on current_process_handle; open a new
12883 handle using the process id.
12884 (win32_wait): Call win32_clear_inferiors when the inferior process
12887 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12889 * server.c (monitor_show_help): Add "exit".
12891 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12893 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12894 (clean): Add reg-xtensa.c.
12895 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12896 * configure.srv (xtensa*-*-linux*) New target.
12897 * linux-xtensa-low.c: New.
12898 * xtensa-xtregs.c: New.
12900 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12902 * hostio.c: Don't include errno.h.
12903 (errno_to_fileio_errno): Move to hostio-errno.
12904 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12905 error number outputting to the target->hostio_last_error callback.
12906 (hostio_packet_error): Use FILEIO_EINVAL directly.
12907 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12908 calls to hostio_error.
12909 * hostio-errno.c: New.
12910 * server.h (hostio_last_error_from_errno): Declare.
12911 * target.h (target_ops): Add hostio_last_error member.
12912 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12913 as hostio_last_error handler.
12914 * spu-low.c (spu_target_ops): Likewise.
12915 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12916 (wince_hostio_last_error): New functions.
12917 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12918 as hostio_last_error handler.
12919 (win32_target_ops) [!_WIN32_WCE]: Register
12920 hostio_last_error_from_errno as hostio_last_error handler.
12921 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12922 (hostio-errno.o): New rule.
12923 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12924 * configure.srv (srv_hostio_err_objs): New variable. Default to
12926 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12927 * configure: Regenerate.
12929 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12931 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12932 (linux_kill, linux_detach): Clean up the process list.
12933 * remote-utils.c (remote_open): Improve port number parsing.
12934 (putpkt_binary, input_interrupt): Only send interrupts if the target
12936 * server.c (extended_protocol): Make static.
12937 (attached): Define earlier.
12938 (exit_requested, response_needed, program_argv): New variables.
12939 (target_running): New.
12940 (start_inferior): Clear attached here.
12941 (attach_inferior): Set attached here.
12942 (require_running): Define.
12943 (handle_query): Use require_running and target_running. Implement
12945 (handle_v_attach, handle_v_run): New.
12946 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12947 (gdbserver_usage): Update.
12948 (main): Redo argument parsing. Handle --debug and --multi. Handle
12949 --attach along with other options or after the port. Save
12950 program_argv. Support no initial program. Resynchronize
12951 communication with GDB after an error. Handle "monitor exit".
12952 Use require_running and target_running. Always allow the extended
12953 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12954 restart in extended mode.
12955 * README: Refer to the GDB manual. Update --attach usage.
12957 2007-12-20 Andreas Schwab <schwab@suse.de>
12959 * linux-low.c (STACK_SIZE): Define.
12960 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12961 (linux_test_for_tracefork): Likewise.
12963 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12965 * linux-low.c (linux_wait_for_event): Update messages. Do not
12966 reinsert auto-delete breakpoints.
12967 * mem-break.c (struct breakpoint): Change return type of handler to
12969 (set_breakpoint_at): Update handler type.
12970 (reinsert_breakpoint_handler): Return 1 instead of calling
12972 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12974 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12975 * mem-break.h (set_breakpoint_at): Update handler type.
12976 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12977 * win32-low.c (auto_delete_breakpoint): New.
12978 (get_child_debug_event): Use it.
12980 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12982 * configure.ac: Check for pread and pwrite.
12983 * hostio.c (handle_pread): Fall back to lseek and read.
12984 (handle_pwrite): Fall back to lseek and write.
12985 * config.in, configure: Regenerated.
12987 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12989 * server.c (myresume): Add own_buf argument.
12990 (main): Update calls.
12992 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12994 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12995 * remote-utils.c (remote_open): Do not call disable_async_io.
12996 (block_async_io): Delete.
12997 (unblock_async_io): Make static.
12998 (initialize_async_io): New.
12999 * server.c (handle_v_cont): Handle async I/O here.
13000 (myresume): Likewise. Move other common resume tasks here...
13001 (main): ... from here. Call initialize_async_io. Disable async
13002 I/O before the main loop.
13003 * server.h (initialize_async_io): Declare.
13004 (block_async_io, unblock_async_io): Delete prototypes.
13005 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13007 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13009 * remote-utils.c (readchar): Allow binary data in received messages.
13011 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13013 * win32-low.c (attaching): New global.
13014 (win32_create_inferior): Clear the `attaching' global.
13015 (win32_attach): Set the `attaching' global.
13016 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13017 attaching. Only set a breakpoint at the entry point if not
13020 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13022 * server.c (main): Don't report dll events on the initial
13023 connection on attaches.
13025 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13027 * server.c (main): Relax numerical bases supported for the pid of
13028 the --attach command line argument.
13030 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13032 * win32-low.c (win32_attach): Call OpenProcess before
13033 DebugActiveProcess, not after. Add last error output to error
13036 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13038 * win32-low.c (win32_get_thread_context)
13039 (win32_set_thread_context): New functions.
13040 (thread_rec): Use win32_get_thread_context.
13041 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13042 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13045 2007-12-03 Leo Zayas
13046 Pedro Alves <pedro_alves@portugalmail.pt>
13048 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13050 (child_add_thread): Minor cleanup.
13051 (child_continue): Resume artificially suspended threads before
13052 calling ContinueDebugEvent.
13053 (suspend_one_thread): New.
13054 (fake_breakpoint_event): New.
13055 (get_child_debug_event): Change return type to int. Check here if
13056 gdb sent an interrupt request. If a soft interrupt was requested,
13057 fake a breakpoint event. Return 0 if there is no event to handle,
13059 (win32_wait): Don't check here if gdb sent an interrupt request.
13060 Ensure there is a valid event to handle.
13061 (win32_request_interrupt): Add soft interruption method as last
13064 2007-12-03 Leo Zayas
13065 Pedro Alves <pedro_alves@portugalmail.pt>
13067 * win32-low.h (win32_thread_info): Add descriptions to the
13068 structure members. Replace `suspend_count' counter by a
13070 * win32-low.c (thread_rec): Update condition of when to get the
13071 context from the inferior. Rely on ContextFlags being set if it
13072 has already been retrieved. Only suspend the inferior thread if
13073 we haven't already. Warn if that fails.
13074 (continue_one_thread): s/suspend_count/suspended/. Only call
13075 ResumeThread once. Warn if that fails.
13077 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13079 * win32-low.c (win32_wait): Don't read from the inferior when it
13080 has already exited.
13082 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13084 * Makefile.in (win32_low_h): New variable.
13085 (win32-low.o): Add dependency on $(win32_low_h).
13086 (win32-arm-low.o, win32-i386-low.o): New rules.
13088 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13090 * hostio.c: Correct copyright year.
13092 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13094 * Makefile.in (OBS): Add hostio.o.
13095 (hostio.o): New rule.
13096 * server.h (handle_vFile): Declare.
13097 * hostio.c: New file.
13098 * server.c (handle_v_requests): Take packet_len and new_packet_len
13099 for binary packets. Call handle_vFile.
13100 (main): Update call to handle_v_requests.
13102 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13104 * linux-low.c: Include <sched.h>.
13106 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13108 * linux-low.c (linux_tracefork_grandchild): New.
13109 (linux_tracefork_child): Use clone.
13110 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13112 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13114 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13116 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13118 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13120 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13122 * inferiors.c (change_inferior_id): Delete.
13123 (add_pid_to_list, pull_pid_from_list): New.
13124 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13125 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13126 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13127 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13128 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13129 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13130 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13131 (using_threads): Always set to 1.
13132 (handle_extended_wait): New.
13133 (add_process): Do not set TID.
13134 (linux_create_inferior): Set must_set_ptrace_flags.
13135 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13136 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13137 (linux_thread_alive): Rename TID argument to LWPID.
13138 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13139 (linux_wait_for_event): Do not use TID or check using_threads. Update
13140 call to dead_thread_notify. Call handle_extended_wait.
13141 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13142 (send_sigstop): Delete sigstop_sent.
13143 (wait_for_sigstop): Avoid TID.
13144 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13145 (linux_test_for_tracefork): New.
13146 (linux_lookup_signals): Use thread_db_active and
13147 linux_supports_tracefork_flag.
13148 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13149 * linux-low.h (get_process_thread): Avoid TID.
13150 (struct process_ifo): Move thread_known and tid to the end. Remove
13152 (linux_attach_lwp, thread_db_init): Update prototypes.
13153 * server.h (change_inferior_id): Delete prototype.
13154 (add_pid_to_list, pull_pid_from_list): New prototypes.
13155 * thread-db.c (thread_db_use_events): New.
13156 (find_first_thread): Rename to...
13157 (find_one_thread): ...this. Update callers and messages. Do not
13158 call fatal. Check thread_db_use_events. Do not call
13159 change_inferior_id or new_thread_notify.
13160 (maybe_attach_thread): Update. Do not call new_thread_notify.
13161 (thread_db_init): Set thread_db_use_events. Check use_events.
13162 * utils.c (fatal, warning): Correct message prefix.
13164 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13166 * Makefile.in (clean): Remove new files.
13167 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13168 (powerpc-64.o, powerpc-64.c): New rules.
13169 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13170 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13172 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13174 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13175 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13176 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13177 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13178 (target_regsets): Add AltiVec and SPE register sets.
13179 * configure.ac: Check for AltiVec and SPE.
13180 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13181 (ppc_fill_vrregset, ppc_store_vrregset): New.
13182 (target_regsets): Add AltiVec register set.
13183 * configure: Regenerated.
13185 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13187 * linux-low.c (O_LARGEFILE): Define.
13188 (linux_read_memory): Use /proc/PID/mem.
13189 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13190 * configure, config.in: Regenerated.
13192 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13194 * linux-low.c (linux_wait_for_event): Do not pass signals while
13197 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13199 * win32-low.c (create_process): New.
13200 (win32_create_inferior): Use create_process instead of
13201 CreateProcess. If create_process failed retry appending an ".exe"
13202 suffix. Store the GetLastError result immediatelly after
13203 create_process calls and use it on the call to error.
13205 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13207 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13209 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13211 * configure.ac: Switch license to GPLv3.
13213 2007-08-01 Michael Snyder <msnyder@access-company.com>
13215 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13217 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13219 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13221 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13222 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13223 CloseToolhelp32Snapshot.
13224 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13225 CloseToolhelp32Snapshot.
13227 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13229 * server.c (main): Check for inferior exit before main loop.
13231 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13233 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13234 instead of on tmp_desc.
13236 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13237 Daniel Jacobowitz <dan@codesourcery.com>
13239 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13240 (add_thread): Minor cleanups.
13241 (clear_inferiors): Move lower in the file. Clear the DLL
13243 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13244 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13245 (xml_escape_text): New.
13246 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13248 (handle_v_cont): Report errors.
13249 (gdbserver_version): Update.
13250 (main): Correct size of own_buf. Do not report initial DLL events.
13251 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13252 (unloaded_dll, xml_escape_text): New.
13253 * win32-low.c (enum target_waitkind): Update comments.
13254 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13255 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13256 (win32_EnumProcessModules, win32_GetModuleInformation)
13257 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13258 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13259 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13260 (win32_Module32First, win32_Module32Next, load_toolhelp)
13261 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13262 (get_child_debug_event): Handle DLL events.
13263 (win32_wait): Likewise.
13265 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13267 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13268 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13270 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13272 * win32-low.c (handle_output_debug_string): Ignore event if not
13275 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13277 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13279 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13281 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13283 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13285 * inferiors.c (change_inferior_id): Add comment.
13286 * linux-low.c (check_removed_breakpoint): Add an early
13287 prototype. Improve debug output.
13288 (linux_attach): Doc update.
13289 (linux_detach_one_process, linux_detach): Clean up before releasing
13291 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13292 * linux-low.h (struct process_info): Doc improvement.
13293 * mem-break.c (delete_all_breakpoints): New.
13294 * mem-break.h (delete_all_breakpoints): New prototype.
13295 * thread-db.c (find_first_thread): New.
13296 (thread_db_create_event): Call it instead of
13297 thread_db_find_new_threads. Clean up unused variables.
13298 (maybe_attach_thread): Remove first thread handling.
13299 (thread_db_find_new_threads): Use find_first_thread.
13300 (thread_db_get_tls_address): Likewise.
13302 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13304 * thread-db.c (thread_db_find_new_threads): Add prototype.
13305 (thread_db_create_event): Check for the main thread before adding
13307 (maybe_attach_thread): Only enable event reporting if TID == 0.
13308 (thread_db_get_tls_address): Check for new threads.
13310 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13312 * linux-low.c (linux_create_inferior): Try execv before execvp.
13313 * spu-low.c (spu_create_inferior): Likewise.
13315 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13317 * linux-low.c (linux_create_inferior): Change execv to execvp.
13318 * spu-low.c (spu_create_inferior): Likewies.
13320 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13322 * Makefile.in (clean): Clean new files instead of deleted ones.
13323 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13324 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13326 * configure.srv: Specify XML files and new regformats for MIPS and
13328 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13329 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13330 an entry for the restart register.
13331 (mips_cannot_fetch_register, mips_cannot_store_register)
13332 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13333 register names to match the XML descriptions.
13334 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13335 restart register instead of $0.
13337 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13338 Markus Deuling <deuling@de.ibm.com>
13340 * remote-utils.c (decode_xfer_write): New function.
13341 * server.h (decode_xfer_write): Add prototype.
13342 * server.c (handle_query): Add PACKET_LEN argument. Support
13343 qXfer:spu:read and qXfer:spu:write packets.
13344 (main): Pass packet_len to handle_query.
13345 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13346 * target.h (target_ops): Add qxfer_spu.
13348 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13350 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13351 accessing non-seekable spufs files.
13353 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13355 * server.c (handle_query): Add reply for qC packet.
13357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13358 Leo Zayas <lerele@champenstudios@com>
13360 * server.h (check_remote_input_interrupt_request): New function.
13361 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13362 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13363 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13364 (check_remote_input_interrupt_request): New function.
13365 * server.h (check_remote_input_interrupt_request): Declare.
13366 * win32-low.c (winapi_DebugBreakProcess,
13367 winapi_GenerateConsoleCtrlEvent): New typedefs.
13368 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13370 (win32_wait): Check for remote interrupt request
13371 with check_remote_input_interrupt_request.
13372 (win32_request_interrupt): New function.
13373 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13375 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13377 * win32-low.c (debug_registers_changed,
13378 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13379 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13380 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13381 (thread_rec): Get context using the low target.
13382 (child_add_thread): Call thread_added on the low target,
13383 which does the same thing.
13385 (do_initial_child_stuff): Remove debug registers references.
13386 Set context using the low target. Resume threads after
13387 setting the contexts.
13388 (child_continue): Remove dead variable. Remove debug
13389 registers references.
13390 (child_fetch_inferior_registers): Go through the low target.
13391 (do_child_store_inferior_registers): Remove.
13392 (child_store_inferior_registers): Go through the low target.
13393 (win32_resume): Remove debug registers references.
13394 Set context using the low target.
13395 (handle_exception): Change return type to void. Don't record
13396 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13397 first chance exception.
13398 (get_child_debug_event): Change return type to void. Remove
13399 goto loop. Always return after waiting for debug event.
13400 (win32_wait): Convert to switch statement. Handle spurious
13403 * win32-i386-low.c (debug_registers_changed,
13404 debug_registers_used): New.
13405 (initial_stuff): Rename to ...
13406 (i386_initial_stuff): ... this. Clear debug registers
13408 (store_debug_registers): Delete.
13409 (i386_get_thread_context): New.
13410 (load_debug_registers): Delete.
13411 (i386_set_thread_context): New.
13412 (i386_thread_added): New.
13413 (single_step): Rename to ...
13414 (i386_single_step): ... this.
13415 (do_fetch_inferior_registers): Rename to ...
13416 (i386_fetch_inferior_register): ... this.
13417 (i386_store_inferior_register): New.
13418 (the_low_target): Adapt to new interface.
13420 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13421 (arm_get_thread_context): New.
13422 (arm_set_thread_context): New.
13424 (do_fetch_inferior_registers): Rename to ...
13425 (arm_fetch_inferior_register): ... this.
13426 (arm_store_inferior_register): New.
13427 (arm_wince_breakpoint): Reimplement as unsigned long.
13428 (arm_wince_breakpoint_len): Define.
13429 (the_low_target): Adapt to new interface.
13431 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13432 load_debug_registers. Add get_thread_context, set_thread_context,
13433 thread_added and store_inferior_register. Rename
13434 fetch_inferior_registers to fetch_inferior_register.
13435 (regptr): Remove declaration.
13437 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13439 * linux-low.c (linux_detach): Change return type to int. Return 0.
13440 * spu-low.c (spu_detach): Likewise.
13442 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13444 * target.h (target_ops): Change return type of detach to int.
13446 (join_inferior): New.
13447 * server.c (main): Don't skip detach support on mingw32.
13448 If the inferior doesn't support detaching return error.
13449 Call join_inferior instead of using waitpid.
13450 * linux-low.c (linux_join): New.
13451 (linux_target_op): Add linux_join.
13452 * spu-low.c (spu_join): New.
13453 (spu_target_ops): Add spu_join.
13454 * win32-low.c (win32_detach): Adapt to new interface.
13455 Reopen current_process_handle before detaching. Issue a child
13456 resume before detaching.
13458 (win32_target_op): Add win32_join.
13460 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13462 * win32-low.c (win32-attach): Fix return value.
13463 * target.h (target_ops): Describe ATTACH return values.
13465 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13467 * win32-low.c (GETPROCADDRESS): Define.
13468 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13469 (winapi_DebugSetProcessKillOnExit): Likewise.
13470 (win32_create_inferior): Force usage of ansi CreateProcessA.
13471 (win32_attach): Use GETPROCADDRESS.
13472 (win32_detach): Likewise.
13474 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13476 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13478 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13480 * win32-low.c: Commit leftover changes from 2007-03-29.
13482 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13484 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13485 fields short instead of int. Add explicit padding.
13486 (i387_cache_to_fsave): Remove unnecessary casts.
13487 (i387_fsave_to_cache): Doc fix.
13488 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13490 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13492 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13493 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13495 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13497 * configure.srv (arm*-*-mingw32ce*): Move near the other
13500 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13502 * configure.ac: Add errno checking.
13503 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13504 sys/file.h and malloc.h.
13505 (AC_CHECK_DECLS): Add perror.
13506 (srv_mingwce): Handle.
13507 * configure.srv (i[34567]86-*-cygwin*): Add
13508 win32-i386-low.o to srv_tgtobj.
13509 (i[34567]86-*-mingw*): Likewise.
13510 (arm*-*-mingw32ce*): Add case.
13511 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13512 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13513 [__MINGW32CE__] (strerror): New function.
13514 [__MINGW32CE__] (errno): Define to GetLastError.
13515 [__MINGW32CE__] (COUNTOF): New macro.
13516 (remote_open): Remove extra close call.
13517 * mem-break.c (delete_breakpoint_at): New function.
13518 * mem-break.h (delete_breakpoint_at): Declare.
13519 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13520 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13521 [USE_WIN32API] (read, write): Add char* casts.
13522 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13523 * server.h: Include wincecompat.h on Windows CE.
13524 [HAVE_ERRNO_H]: Check.
13525 (perror): Declare if not declared.
13526 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13527 (perror_with_name): Remove errno declaration.
13528 * wincecompat.h: New.
13529 * wincecompat.c: New.
13530 * win32-low.h: New.
13531 * win32-arm-low.c: New.
13532 * win32-i386-low.c: New.
13533 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13534 (OUTMSG2): Make it safe.
13536 (COUNTOF): New macro.
13537 (NUM_REGS): Get it from the low target.
13538 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13539 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13540 (thread_rec): Let low target handle debug registers.
13541 (child_add_thread): Likewise.
13542 (child_init_thread_list): Likewise.
13543 (continue_one_thread): Likewise.
13545 (do_child_fetch_inferior_registers): Move to ...
13546 * win32-i386-low.c: ... here, and rename to ...
13547 (do_fetch_inferior_registers): ... this.
13548 * win32-low.c (child_fetch_inferior_registers):
13549 Go through the low target.
13550 (do_child_store_inferior_registers): Use regptr.
13551 (strwinerror): New function.
13552 (win32_create_inferior): Handle Windows CE.
13553 Use strwinerror instead of strerror on Windows error
13554 codes. Add program to the error output.
13555 Don't close the main thread handle on Windows CE.
13556 (win32_attach): Use coredll.dll on Windows CE.
13557 (win32_kill): Close current process and current
13559 (win32_detach): Use coredll.dll on Windows CE.
13560 (win32_resume): Let low target handle debug registers, and
13562 (handle_exception): Add/Remove initial breakpoint. Avoid
13563 non-existant WSTOPSIG on Windows CE.
13564 (win32_read_inferior_memory): Cast to remove warning.
13565 (win32_arch_string): Go through the low target.
13566 (initialize_low): Call set_breakpoint_data with the low
13567 target's breakpoint.
13568 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13569 FOP_REGNUM, mappings): Move to ...
13570 * win32-i386-low.c: ... here.
13571 * win32-low.c (win32_thread_info): Move to ...
13572 * win32-low.h: ... here.
13573 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13574 win32-arm-low.c and wincecompat.c.
13575 (all:): Add $EXEEXT.
13576 (install-only:): Likewise.
13577 (gdbserver:): Likewise.
13578 (gdbreplay:): Likewise.
13579 * config.in: Regenerate.
13580 * configure: Regenerate.
13582 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13584 * win32-low.c: Rename typedef thread_info to
13585 win32_thread_info throughout.
13587 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13589 * win32-i386-low.c: Rename to ...
13590 * win32-low.c: ... this.
13591 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13592 * Makefile.in: Likewise.
13594 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13596 * remote-utils.c (monitor_output): Constify msg parameter.
13597 * server.h (monitor_output): Likewise.
13598 * win32-i386-low.c (handle_output_debug_string): New.
13599 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13600 handle_output_debug_string.
13601 (get_child_debug_event): Likewise.
13603 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13605 * server.c (main): Correct strtoul check.
13607 2007-03-27 Jon Ringle <jon@ringle.org>
13609 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13611 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13613 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13615 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13617 * terminal.h: Check HAVE_SGTTY_H.
13619 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13621 * remote-utils.c (remote_open): Print out the assigned port number.
13623 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13625 * remote-utils.c (monitor_output): New function.
13626 * server.c (debug_threads): Define here.
13627 (monitor_show_help): New function.
13628 (handle_query): Handle qRcmd.
13629 (main): Do not handle 'd' packet.
13630 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13631 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13634 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13636 * Makefile.in (EXEEXT): New.
13637 (clean): Use $(EXEEXT).
13639 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13641 * target.h (target_ops): Rename send_signal to request_interrupt,
13642 and remove enum target_signal parameter.
13643 * linux-low.c (linux_request_interrupt): Rename from
13644 linux_send_signal, and always send SIGINT.
13645 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13646 and always send SIGINT.
13647 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13649 (input_interrupt): Likewise.
13651 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13653 * server.c (get_features_xml): Check if target implemented
13655 * win32-i386-low.c (win32_arch_string): New.
13656 (win32_target_ops): Add win32_arch_string as arch_string member.
13658 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13660 * spu-low.c (spu_arch_string): New.
13661 (spu_target_ops): Add spu_arch_string.
13663 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13665 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13666 * configure.ac: Do not check for terminal.h.
13667 * configure, config.in: Regenerated.
13669 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13671 * Makefile.in (OBS): Add $(XML_BUILTIN).
13672 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13674 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13675 (arm-with-iwmmxt.c): New.
13676 * config.in, configure: Regenerate.
13677 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13678 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13679 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13680 (arm*-*-linux*): Add iWMMXt and regset support.
13681 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13682 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13683 (arm_store_wmmxregset, target_regsets): New.
13684 * server.c (get_features_xml): Take annex argument. Check builtin
13686 (handle_query): Handle multiple annexes.
13688 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13690 * remote-utils.c [USE_WIN32API] (read, write): Define.
13691 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13694 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13696 * linux-i386-low.c (the_low_target): Set arch_string.
13697 * linux-x86-64-low.c (the_low_target): Likewise.
13698 * linux-low.c (linux_arch_string): New.
13699 (linux_target_ops): Add it.
13700 * linux-low.h (struct linux_target_ops): Add arch_string.
13701 * server.c (write_qxfer_response): Use const void * for DATA.
13702 (get_features_xml): New.
13703 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13704 * target.h (struct target_ops): Add arch_string method.
13706 2007-01-03 Denis Pilat <denis.pilat@st.com>
13707 Daniel Jacobowitz <dan@codesourcery.com>
13709 * linux-low.c (linux_kill): Handle being called with no threads.
13710 * win32-i386-low.c (win32_kill): Likewise.
13711 (get_child_debug_event): Clear current_process_handle.
13713 2006-12-30 Denis PILAT <denis.pilat@st.com>
13714 Daniel Jacobowitz <dan@codesourcery.com>
13716 * remote-utils.c (remote_open): Check the type of specified
13717 serial port devices before opening them.
13718 * server.c (main): Kill the inferior if an error occurs during
13719 the first remote_open.
13721 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13723 * README: Update supported targets.
13725 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13727 * Makefile.in (clean): Remove reg-mips64.c.
13728 (reg-mips64.c, reg-mips64.o): New rules.
13729 * configure.srv: Handle mips64. Include regset support for mips.
13730 * linux-mips-low.c (union mips_register): New.
13731 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13732 (mips_breakpoint, mips_breakpoint_at): Use int.
13733 (mips_collect_register, mips_supply_register)
13734 (mips_collect_register_32bit, mips_supply_register_32bit)
13735 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13736 (mips_store_fpregset, target_regsets): New.
13737 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13739 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13741 * configure.srv: Add target "spu*-*-*".
13742 * Makefile.in (clean): Remove reg-spu.c.
13743 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13744 * spu-low.c: New file.
13746 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13748 * configure.ac: Correct td_thr_tls_get_addr test.
13749 * configure: Regenerated.
13751 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13753 * linux-low.c (linux_wait_for_event): Reformat. Use the
13754 pass_signals array.
13755 * remote-utils.c (decode_address_to_semicolon): New.
13756 * server.c (pass_signals, handle_general_set): New.
13757 (handle_query): Mention QPassSignals for qSupported.
13758 (main): Call handle_general_set.
13759 * server.h (pass_signals, decode_address_to_semicolon): New.
13761 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13763 * server.c (handle_query): Correct error handling for read_auxv.
13765 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13767 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13768 and srv_linux_thread_db to yes.
13769 * linux-s390-low.c (s390_fill_gregset): New function.
13770 (target_regsets): Define data structure.
13772 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13774 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13775 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13776 * config.in, configure: Regenerated.
13777 * inferiors.c (gdb_id_to_thread): New function.
13778 (gdb_id_to_thread_id): Use it.
13779 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13780 * linux-low.h (struct process_info): Add th member.
13781 (thread_db_get_tls_address): New prototype.
13782 * remote-utils.c (decode_address): Make non-static.
13783 * server.c (handle_query): Handle qGetTLSAddr.
13784 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13785 * target.h (struct target_ops): Add get_tls_address.
13786 * thread-db.c (maybe_attach_thread): Save the thread handle.
13787 (thread_db_get_tls_address): New.
13789 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13791 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13792 (linux_resume_one_process): Take a siginfo_t *. Update all
13793 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13794 (struct pending_signals): Add a siginfo_t.
13795 (linux_wait_for_process): Always set last_status.
13796 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13797 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13798 * linux-low.h (struct process_info): Add last_status.
13800 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13802 * remote-utils.c (try_rle): New function.
13803 (putpkt_binary): Use it.
13805 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13807 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13808 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13809 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13810 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13811 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13814 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13816 * server.c (terminal_fd): New variable.
13817 (old_foreground_pgrp): Likewise.
13818 (restore_old_foreground_pgrp): New function.
13819 (start_inferior): Record the terminal file descriptor in terminal_fd
13820 and its original foreground group in old_foreground_pgrp. Register
13821 restore_old_foreground_pgrp with atexit().
13823 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13825 * server.c (handle_query): Correct qPart to qXfer.
13827 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13829 * configure.ac: Check for more headers which are missing on
13830 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13831 * configure.srv: Add Cygwin and mingw32.
13832 * remote-utils.c: Don't include headers unconditionally which
13833 are missing on mingw32. Include <winsock.h> for mingw32.
13834 (remote_open): Adjust for mingw32 support. Flush
13835 standard error after writing to it.
13836 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13837 (unblock_async_io, enable_async_io, disable_async_io)
13838 (readchar, getpkt): Update for Winsock support.
13839 (prepare_resume_reply): Expect a protocol signal number.
13840 * server.c: Disable <sys/wait.h> on mingw32.
13841 (start_inferior): Adjust for mingw32 support. Flush
13842 standard error after writing to it.
13843 (attach_inferior): Likewise. Use protocol signal
13845 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13847 * win32-i386-low.c: New file.
13848 * Makefile.in (XM_CLIBS): Set.
13849 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13850 (win32-i386-low.o): New dependency rule.
13851 * linux-low.c (linux_wait): Use target signal numbers.
13852 * target.h (struct target_ops): Doc fix.
13853 * server.h (target_signal_to_name): New prototype.
13854 * gdbreplay.c: Don't include headers unconditionally which
13855 are missing on mingw32. Include <winsock.h> for mingw32.
13856 (remote_close, remote_open): Adjust for Winsock support.
13857 * configure, config.in: Regenerated.
13859 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13861 * server.c (decode_xfer_read, write_qxfer_response): New.
13862 (handle_query): Take a packet length argument. Handle
13863 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13864 the qSupported response.
13865 (main): Update call to handle_query.
13867 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13869 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13870 (putpkt_binary): Renamed from putpkt and adjusted for binary
13872 (putpkt): New wrapper for putpkt_binary.
13873 (readchar): Don't mask off the high bit.
13874 (decode_X_packet): New function.
13875 * server.c (main): Call putpkt_binary if a handler sets the packet
13876 length. Save the length of the incoming packet. Handle 'X'.
13877 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13879 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13881 * server.c (handle_query): Handle qSupported.
13883 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13885 * remote-utils.c (all_symbols_looked_up): New variable.
13886 (look_up_one_symbol): Check it.
13887 * server.h (look_up_one_symbol): New declaration.
13888 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13890 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13892 * Makefile.in (linux-arm-low.o): Update dependencies.
13893 * linux-arm-low.c: Include "gdb_proc_service.h".
13894 (PTRACE_GET_THREAD_AREA): Define.
13895 (ps_get_thread_area): New function.
13897 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13899 * configure.srv (m68k*-*-uclinux*): New target.
13900 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13901 (linux_resume_one_process): Remove extraneous cast.
13902 (linux_read_offsets): New.
13903 (linux_target_op): Add linux_read_offsets on mmuless systems.
13904 * server.c (handle_query): Add qOffsets logic.
13905 * target.h (struct target_ops): Add read_offsets.
13907 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13909 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13910 (PTRACE_GET_THREAD_AREA): Define.
13911 (ps_get_thread_area): New function.
13912 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13913 (linux-x86-64-low.o): Update.
13915 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13917 * configure.ac: Remove checks for prfpregset_t.
13918 * gdb_proc_service.h: New file.
13919 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13920 new "gdb_proc_service.h".
13921 * proc-service.c: Likewise.
13922 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13923 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13924 * Makefile.in (gdb_proc_service_h): Updated.
13925 * configure, config.in: Regenerated.
13927 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13929 * remote-utils.c (prepare_resume_reply): Move declaration
13930 of gdb_id_from_wait to the top of the block.
13932 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13934 * linux-low.c (regsets_store_inferior_registers): Read the regset
13935 from the target before filling it.
13937 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13939 * server.c (attach_inferior): Return SIGTRAP for a successful
13942 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13944 * Makefile.in (OBS): Add version.o.
13945 (STAGESTUFF): Delete.
13946 (version.o): Add dependencies.
13947 (version.c): Replace rule.
13948 (clean): Remove version.c.
13949 * server.c (gdbserver_version): New.
13950 (gdbserver_usage): Use printf.
13951 (main): Handle --version and --help.
13952 * server.h (version, host_name): Add declarations.
13954 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13966 * linux-x86-64-low.c:
13968 * linux-s390-low.c:
13969 * linux-ppc64-low.c:
13971 * linux-mips-low.c:
13972 * linux-m68k-low.c:
13973 * linux-m32r-low.c:
13976 * linux-ia64-low.c:
13977 * linux-i386-low.c:
13978 * linux-crisv32-low.c:
13990 * gdbserver.1: Add (C) after Copyright. Update the FSF
13993 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13995 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13996 (arm_breakpoint_at): Recognize both breakpoints.
13997 (the_low_target): Use the correct breakpoint instruction.
13999 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14001 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14002 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14003 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14004 (the_low_target): Update.
14006 2005-10-25 Andreas Schwab <schwab@suse.de>
14008 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14010 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14011 (ia64_num_regs): Reduce to 462.
14013 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14015 * acinclude.m4: Correct quoting.
14016 * aclocal.m4: Regenerated.
14018 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14019 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14020 (thread_db_init): Call thread_db_err_str.
14021 * configure.ac: Check for TD_VERSION.
14022 * config.in, configure: Regenerated.
14024 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14026 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14028 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14030 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14031 is not available. Define HAVE_PTRACE_GETREGS if it is.
14032 * config.in, configure: Regenerated.
14033 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14034 * linux-i386-low.c, linux-m68k-low.c: Update to use
14035 HAVE_PTRACE_GETREGS.
14036 * linux-low.c (regsets_fetch_inferior_registers)
14037 (regsets_store_inferior_registers): Only return 0 if we processed
14039 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14040 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14042 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14044 * inferiors.c (struct thread_info): Add gdb_id.
14045 (add_thread): Add gdb_id argument.
14046 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14047 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14048 calls to add_thread.
14049 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14050 * server.c (handle_query): Use thread_to_gdb_id.
14051 (handle_v_cont, main): Use gdb_id_to_thread_id.
14052 * server.h (add_thread): Update prototype.
14053 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14056 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14058 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14059 left-padded registers.
14060 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14061 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14063 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14065 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14066 * configure: Regenerate.
14067 * config.in: Regenerate.
14068 * server.h (NEED_DECLARATION_STRERROR):
14069 Replace with !HAVE_DECL_STRERROR.
14071 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14073 * linux-low.c (linux_wait, linux_send_signal): Don't test
14074 an unsigned long variable for > 0 if it could be MAX_ULONG.
14075 * server.c (myresume): Likewise.
14076 * target.c (set_desired_inferior): Likewise.
14078 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14080 * configure.ac: Simplify and improve check for socklen_t.
14081 * configure, config.in: Regenerate.
14083 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14085 * acconfig.h: Remove.
14086 * configure.ac: Add a test for socklen_t. Use three-argument
14087 AC_DEFINE throughout.
14088 * config.in: Regenerated using autoheader 2.59.
14089 * configure: Regenerated.
14091 * gdbreplay.c (socklen_t): Provide a default.
14092 (remote_open): Use socklen_t.
14093 * remote-utils.c (socklen_t): Provide a default.
14094 (remote_open): Use socklen_t.
14095 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14098 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14100 * linux-low.c (linux_read_memory, linux_write_memory)
14101 (linux_read_auxv): Likewise.
14102 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14103 (check_mem_write): Likewise.
14104 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14106 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14107 (registers_from_string, register_data): Likewise.
14108 * server.c (handle_query, main): Likewise.
14109 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14110 (decode_M_packet): Likewise.
14111 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14112 * target.h (struct target_ops): Update read_memory, write_memory,
14114 (read_inferior_memory, write_inferior_memory): Update.
14115 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14116 to unsigned char *.
14117 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14118 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14119 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14120 linux-s390-low.c, linux-sh-low.c: Update for changes in
14121 read_inferior_memory and the_low_target->breakpoint.
14123 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14125 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14126 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14127 * configure.srv: Add powerpc64-*-linux*.
14128 * linux-ppc64-low.c: New file.
14130 2005-05-23 Orjan Friberg <orjanf@axis.com>
14132 * linux-cris-low.c: New file with support for CRIS.
14133 * linux-crisv32-low.c: Ditto for CRISv32.
14134 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14135 (clean): Add reg-cris.c and reg-crisv32.c.
14136 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14137 reg-crisv32.o, and reg-crisv32.c to make rules.
14138 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14139 recognized targets.
14141 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14143 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14144 of sizeof (PTRACE_XFER_TYPE).
14145 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14147 2005-05-12 Orjan Friberg <orjanf@axis.com>
14149 * target.h (struct target_ops): Add insert_watchpoint,
14150 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14151 pointers for hardware watchpoint support.
14152 * linux-low.h (struct linux_target_ops): Ditto.
14153 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14154 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14155 to linux_target_ops.
14156 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14158 * server.c (main): Recognize 'Z' and 'z' packets.
14160 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14162 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14163 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14164 (the_low_target): Add new members.
14166 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14168 * proc-service.c (ps_lgetregs): Search all_processes instead of
14171 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14173 * server.c (start_inferior): Change return type to int.
14174 (attach_inferior): Change sigptr to int *.
14175 (handle_v_cont, handle_v_requests): Change signal to int *.
14176 (main): Change signal to int.
14178 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14180 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14181 * configure.srv: Add m32r*-*-linux*.
14182 * linux-m32r-low.c: New file.
14184 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14186 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14188 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14190 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14191 Take unsigned long arguments for PIDs.
14192 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14193 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14194 (wait_for_sigstop, linux_resume_one_process)
14195 (regsets_fetch_inferior_registers, linux_send_signal)
14196 (linux_read_auxv): Likewise. Update the types of variables holding
14197 PIDs. Update format string specifiers.
14198 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14199 * remote-utils.c (prepare_resume_reply): Likewise.
14200 * server.c (cont_thread, general_thread, step_thread)
14201 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14203 (handle_query): Update format specifiers.
14204 (handle_v_cont, main): Use strtoul for thread IDs.
14205 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14206 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14207 (general_thread, step_thread, thread_from_wait)
14208 (old_thread_from_wait): Update.
14209 * target.h (struct thread_resume): Use unsigned long for THREAD.
14210 (struct target_ops): Use unsigned long for arguments to attach and
14213 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14215 * acinclude.m4: Include bfd/bfd.m4 directly.
14216 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14217 <agriffis@toolchain.org>.
14218 * aclocal.m4, configure: Regenerated.
14220 2005-01-07 Andrew Cagney <cagney@gnu.org>
14222 * configure.ac: Rename configure.in, require autoconf 2.59.
14223 * configure: Re-generate.
14225 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14227 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14228 LIBS when finished.
14229 * aclocal.m4: Regenerated.
14230 * configure: Regenerated.
14232 2004-11-21 Andreas Schwab <schwab@suse.de>
14234 * linux-m68k-low.c (m68k_num_gregs): Define.
14235 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14236 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14237 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14238 (m68k_breakpoint_at): New. Add to the_low_target.
14240 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14241 srv_linux_thread_db to yes.
14243 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14245 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14246 (ARCH_SET_FS): Likewise.
14247 (ARCH_GET_FS): Likewise.
14248 (ARCH_GET_GS): Likewise.
14250 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14252 * linux-i386-low.c (ps_get_thread_area): New.
14253 * linux-x86-64-low.c (ps_get_thread_area): New.
14254 * linux-low.c: Include <sys/syscall.h>.
14255 (linux_kill_one_process): Don't kill the first thread here.
14256 (linux_kill): Kill the first thread here.
14257 (kill_lwp): New function.
14258 (send_sigstop, linux_send_signal): Use it.
14259 * proc-service.c: Clean up #ifdefs.
14260 (fpregset_info): Delete.
14261 (ps_lgetregs): Update and enable implementation.
14262 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14264 * remote-utils.c (struct sym_cache, symbol_cache): New.
14265 (input_interrupt): Print a clearer message.
14266 (async_io_enabled): New variable.
14267 (enable_async_io, disable_async_io): Use it. Update comments.
14268 (look_up_one_symbol): Use the symbol cache.
14269 * thread-db.c (thread_db_look_up_symbols): New function.
14270 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14272 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14274 * configure.in: Test for -rdynamic.
14275 * configure: Regenerated.
14276 * Makefile (INTERNAL_LDFLAGS): New.
14277 (gdbserver, gdbreplay): Use it.
14279 2004-09-02 Andrew Cagney <cagney@gnu.org>
14281 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14283 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14285 * linux-low.c (linux_wait): Clear all_processes list also.
14287 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14289 * linux-low.c: Include <errno.h>. Remove extern declaration of
14292 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14294 * gdbreplay.c, server.h, utils.c: Update copyright years.
14296 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14298 * server.c (main): Print child status or termination signal from
14299 variable 'signal', not 'sig'.
14301 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14303 * linux-low.c (linux_read_memory): Change return type to
14304 int. Check for and return error from ptrace().
14305 * target.c (read_inferior_memory): Change return type to int. Pass
14306 back return status from the_target->read_memory().
14307 * target.h (struct target_ops): Adapt *read_memory() prototype.
14309 (read_inferior_memory): Adapt prototype.
14310 * server.c (main): Return an error packet if
14311 read_inferior_memory() returns an error.
14313 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14315 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14316 Unify with other clean targets.
14318 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14320 * server.c (handle_v_cont): Call set_desired_inferior.
14322 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14324 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14326 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14328 * linux-low.c (linux_wait): Unblock async I/O.
14329 (linux_resume): Block and enable async I/O.
14330 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14331 * server.h (block_async_io, unblock_async_io): Add prototypes.
14333 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14335 * remote-utils.c (remote_open): Print a status notice after
14336 opening a TCP port.
14337 * server.c (attach_inferior): Print a status notice after
14340 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14342 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14344 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14346 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14348 * server.c, target.h: Update copyright years.
14350 2004-02-25 Roland McGrath <roland@redhat.com>
14352 * target.h (struct target_ops): New member `read_auxv'.
14353 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14354 * linux-low.c (linux_read_auxv): New function.
14355 (linux_target_ops): Initialize `read_auxv' member to that.
14357 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14359 Committed by Jim Blandy <jimb@redhat.com>.
14361 * linux-s390-low.c (s390_num_regs): Update.
14362 (s390_regmap): Remove control registers. Use __s390x__ predefine
14363 instead of GPR_SIZE to distiguish s390 and s390x targets.
14365 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14367 * linux-low.c: Update copyright year.
14368 (check_removed_breakpoint): Clear pending_is_breakpoint.
14369 (linux_set_resume_request, linux_queue_one_thread)
14370 (resume_status_pending_p): New functions.
14371 (linux_continue_one_thread): Use process->resume.
14372 (linux_resume): Only resume threads if there are no pending events.
14373 * linux-low.h (struct process_info): Add resume request
14376 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14378 * regcache.c (new_register_cache): Clear the allocated register
14379 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14381 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14383 * linux-low.c (linux_resume): Take a struct thread_resume *
14385 (linux_wait): Update call.
14386 (resume_ptr): New static variable.
14387 (linux_continue_one_thread): Renamed from
14388 linux_continue_one_process. Use resume_ptr.
14389 (linux_resume): Use linux_continue_one_thread.
14390 * server.c (handle_v_cont, handle_v_requests): New functions.
14391 (myresume): New function.
14392 (main): Handle 'v' case.
14393 * target.h (struct thread_resume): New type.
14394 (struct target_ops): Change argument of "resume" to struct
14396 (myresume): Delete macro.
14398 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14400 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14401 (uninstall): Support DESTDIR.
14403 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14405 * configure.srv: Add xscale*linux copy of arm*linux entry.
14407 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14409 * linux-arm-low.c (arm_reinsert_addr): New function.
14410 (the_low_target): Add arm_reinsert_addr.
14412 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14414 * mem-break.c: Remove whitespace at end of file.
14416 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14418 * configure.in: Check whether we need to prototype strerror.
14419 * server.h: Optionally prototype strerror.
14420 * gdbreplay.c (perror_with_name): Use strerror.
14421 * linux-low.c (linux_attach_lwp): Use strerror.
14422 * utils.c (perror_with_name): Use strerror.
14423 * config.in, configure: Regenerated.
14425 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14427 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14428 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14430 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14432 * Makefile.in (SFILES): Update.
14433 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14434 low-sun3.c: Remove files.
14436 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14438 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14439 (linux_detach_one_process, linux_detach): New functions.
14440 (linux_target_ops): Add linux_detach.
14441 * server.c (main): Handle 'D' packet.
14442 * target.h (struct target_ops): Add "detach" member.
14443 (detach_inferior): Define.
14445 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14447 From Kelley Cook <kelleycook@wideopenwest.com>:
14448 * configure.srv: Accept i[34567]86 variants.
14450 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14452 * linux-low.c (linux_wait_for_event): Correct comment typos.
14453 (linux_resume_one_process): Call check_removed_breakpoint.
14454 (linux_send_signal): New function.
14455 (linux_target_ops): Add linux_send_signal.
14456 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14458 * target.h (struct target_ops): Add send_signal.
14460 2003-05-29 Jim Blandy <jimb@redhat.com>
14462 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14463 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14464 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14465 away part of the register's value.
14467 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14469 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14470 (linux_wait_for_event, linux_init_signals): Likewise.
14472 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14474 * configure.in: Check for stdlib.h.
14475 * configure: Regenerated.
14476 * config.in: Regenerated.
14478 2003-01-04 Andreas Schwab <schwab@suse.de>
14480 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14482 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14484 * Makefile.in: Remove obsolete code.
14486 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14488 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14489 defined(PT_FPR0_HI).
14491 2002-11-17 Stuart Hughes <seh@zee2.com>
14493 * linux-arm-low.c (arm_num_regs): Increase.
14494 (arm_regmap): Include status register.
14496 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14498 * linux-low.c (register_addr): Remove incorrect -1 check.
14500 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14502 * linux-low.c (linux_create_inferior): Call setpgid. Return
14504 (unstopped_p, linux_signal_pid): Remove.
14505 (linux_target_ops): Remove linux_signal_pid.
14506 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14507 global instead of target method.
14508 * target.h (struct target_ops): Remove signal_pid. Update comment
14509 for create_inferior.
14510 * server.c (signal_pid): New variable.
14511 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14512 gdbserver. Set the child to be the foreground process group.
14513 (attach_inferior): Set signal_pid.
14515 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14517 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14519 2002-08-20 Jim Blandy <jimb@redhat.com>
14521 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14524 2002-08-01 Andrew Cagney <cagney@redhat.com>
14526 * Makefile.in: Make chill references obsolete.
14528 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14530 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14531 * configure: Regenerate.
14532 * config.in: Regenerate.
14534 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14536 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14537 (perror_with_name, remote_close, remote_open, expect, play): Static.
14539 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14541 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14542 byte offsets instead of an array of indexes.
14543 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14545 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14547 * regcache.c: Add comment.
14549 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14551 * thread-db.c: New file.
14552 * proc-service.c: New file.
14553 * acinclude.m4: New file.
14554 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14555 proc-service.o, and thread-db.o.
14556 (linux-low.o): Add USE_THREAD_DB.
14557 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14558 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14559 * aclocal.m4: Regenerated.
14560 * config.in: Regenerated.
14561 * configure: Regenerated.
14562 * configure.in: Check for proc_service.h, sys/procfs.h,
14563 thread_db.h, and linux/elf.h headrs.
14564 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14565 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14566 Check for -lthread_db and thread support.
14567 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14568 PowerPC, and SuperH.
14569 * i387-fp.c: Constify arguments.
14570 * i387-fp.h: Likewise.
14571 * inferiors.c: (struct thread_info): Renamed from
14572 `struct inferior_info'. Remove PID member. Use generic inferior
14573 list header. All uses updated.
14574 (inferiors, signal_pid): Removed.
14575 (all_threads): New variable.
14576 (get_thread): Define.
14577 (add_inferior_to_list): New function.
14578 (for_each_inferior): New function.
14579 (change_inferior_id): New function.
14580 (add_inferior): Removed.
14581 (remove_inferior): New function.
14582 (add_thread): New function.
14583 (free_one_thread): New function.
14584 (remove_thread): New function.
14585 (clear_inferiors): Use for_each_inferior and free_one_thread.
14586 (find_inferior): New function.
14587 (find_inferior_id): New function.
14588 (inferior_target_data): Update argument type.
14589 (set_inferior_target_data): Likewise.
14590 (inferior_regcache_data): Likewise.
14591 (set_inferior_regcache_data): Likewise.
14592 * linux-low.c (linux_bp_reinsert): Remove.
14593 (all_processes, stopping_threads, using_thrads)
14594 (struct pending_signals, debug_threads, pid_of): New.
14595 (inferior_pid): Replace with macro.
14596 (struct inferior_linux_data): Remove.
14597 (get_stop_pc, add_process): New functions.
14598 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14599 Use add_process and add_thread.
14600 (linux_attach_lwp): New function, based on old linux_attach. Use
14601 add_process and add_thread. Set stop_expected for new threads.
14602 (linux_attach): New function.
14603 (linux_kill_one_process): New function.
14604 (linux_kill): Kill all LWPs.
14605 (linux_thread_alive): Use find_inferior_id.
14606 (check_removed_breakpoints, status_pending_p): New functions.
14607 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14608 Update. Use WNOHANG. Wait for cloned processes also. Update process
14609 struct for the found process.
14610 (linux_wait_for_event): New function.
14611 (linux_wait): Use it. Support LWPs.
14612 (send_sigstop, wait_for_sigstop, stop_all_processes)
14613 (linux_resume_one_process, linux_continue_one_process): New functions.
14614 (linux_resume): Support LWPs.
14615 (REGISTER_RAW_SIZE): Remove.
14616 (fetch_register): Use register_size instead. Call supply_register.
14617 (usr_store_inferior_registers): Likewise. Call collect_register.
14618 Fix recursive case.
14619 (regsets_fetch_inferior_registers): Improve error message.
14620 (regsets_store_inferior_registers): Add debugging.
14621 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14622 (unstopped_p, linux_signal_pid): New functions.
14623 (linux_target_ops): Add linux_signal_pid.
14624 (linux_init_signals): New function.
14625 (initialize_low): Call it. Initialize using_threads.
14626 * regcache.c (inferior_regcache_data): Add valid
14628 (get_regcache): Fetch registers lazily. Add fetch argument
14629 and update all callers.
14630 (regcache_invalidate_one, regcache_invalidate): New
14632 (new_register_cache): Renamed from create_register_cache.
14633 Return the new regcache.
14634 (free_register_cache): Change argument to a void *.
14635 (registers_to_string, registers_from_string): Call get_regcache
14636 with fetch flag set.
14637 (register_data): Make static. Pass fetch flag to get_regcache.
14638 (supply_register): Call get_regcache with fetch flag clear.
14639 (collect_register): Call get_regcache with fetch flag set.
14640 (collect_register_as_string): New function.
14641 * regcache.h: Update.
14642 * remote-utils.c (putpkt): Flush after debug output and use
14644 Handle input interrupts while waiting for an ACK.
14645 (input_interrupt): Use signal_pid method.
14646 (getpkt): Flush after debug output and use stderr.
14647 (outreg): Use collect_register_as_string.
14648 (new_thread_notify, dead_thread_notify): New functions.
14649 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14650 and general_thread.
14651 (look_up_one_symbol): Flush after debug output.
14652 * server.c (step_thread, server_waiting): New variables.
14653 (start_inferior): Don't use signal_pid. Update call to mywait.
14654 (attach_inferior): Update call to mywait.
14655 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14656 (main): Don't fetch/store registers explicitly. Use
14657 set_desired_inferior. Support proposed ``Hs'' packet. Update
14659 * server.h: Update.
14660 (struct inferior_list, struct_inferior_list_entry): New.
14661 * target.c (set_desired_inferior): New.
14662 (write_inferior_memory): Constify.
14663 (mywait): New function.
14664 * target.h: Update.
14665 (struct target_ops): New signal_pid method.
14666 (mywait): Removed macro, added prototype.
14668 * linux-low.h (regset_func): Removed.
14669 (regset_fill_func, regset_store_func): New.
14670 (enum regset_type): New.
14671 (struct regset_info): Add type field. Use new operation types.
14672 (struct linux_target_ops): stop_pc renamed to get_pc.
14673 Add decr_pc_after_break and breakpoint_at.
14674 (get_process, get_thread_proess, get_process_thread)
14675 (strut process_info, all_processes, linux_attach_lwp)
14676 (thread_db_init): New.
14678 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14679 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14680 (the_low_target): Add new members.
14681 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14682 (i386_store_fpxregset): Constify.
14683 (target_regsets): Add new kind identifier.
14684 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14685 (i386_set_pc): Add debugging.
14686 (i386_breakpoint_at): New function.
14687 (the_low_target): Add new members.
14688 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14689 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14690 (mips_breakpoint_at): New.
14691 (the_low_target): Add new members.
14692 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14693 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14694 (the_low_target): Add new members.
14695 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14696 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14697 (the_low_target): Add new members.
14698 * linux-x86-64-low.c (target_regsets): Add new kind
14701 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14703 From Martin Pool <mbp@samba.org>:
14704 * server.c (gdbserver_usage): New function.
14707 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14709 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14710 stop_at -> stop_pc.
14712 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14714 * Makefile.in: Remove obsolete code.
14716 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14718 * linux-low.c (regsets_fetch_inferior_registers),
14719 (regsets_store_inferior_registers): Removed cast to int from
14721 * regcache.h: Added declaration of struct inferior_info.
14723 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14725 * inferiors.c (struct inferior_info): Add regcache_data.
14726 (add_inferior): Call create_register_cache.
14727 (clear_inferiors): Call free_register_cache.
14728 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14729 * regcache.c (struct inferior_regcache_data): New.
14730 (registers): Remove.
14731 (get_regcache): New function.
14732 (create_register_cache, free_register_cache): New functions.
14733 (set_register_cache): Don't initialize the register cache here.
14734 (registers_to_string, registers_from_string, register_data): Call
14736 * regcache.h: Add prototypes.
14737 * server.h: Likewise.
14739 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14741 * mem-break.c: New file.
14742 * mem-break.h: New file.
14743 * Makefile.in: Add mem-break.o rule; update server.h
14745 * inferiors.c (struct inferior_info): Add target_data
14747 (clear_inferiors): Free target_data member if set.
14748 (inferior_target_data, set_inferior_target_data): New functions.
14749 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14750 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14751 * linux-low.c (linux_bp_reinsert): New variable.
14752 (struct inferior_linux_data): New.
14753 (linux_create_inferior): Use set_inferior_target_data.
14754 (linux_attach): Likewise. Call add_inferior.
14755 (linux_wait_for_one_inferior): New function.
14756 (linux_wait): Call it.
14757 (linux_write_memory): Add const.
14758 (initialize_low): Call set_breakpoint_data.
14759 * linux-low.h (struct linux_target_ops): Add breakpoint
14761 * server.c (attach_inferior): Remove extra add_inferior
14763 * server.h: Include mem-break.h. Update inferior.c
14765 * target.c (read_inferior_memory)
14766 (write_inferior_memory): New functions.
14767 * target.h (read_inferior_memory)
14768 (write_inferior_memory): Change macros to prototypes.
14769 (struct target_ops): Update comments. Add const to write_memory
14772 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14774 * linux-low.c (usr_store_inferior_registers): Support
14775 registers which are allowed to fail to store.
14776 * linux-low.h (linux_target_ops): Likewise.
14777 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14778 (ppc_cannot_store_register): FPSCR may not be storable.
14780 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14782 * server.h: Include <string.h> if HAVE_STRING_H.
14783 * ChangeLog: Correct paths in last ChangeLog entry.
14785 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14787 * linux-low.h: Remove obsolete prototypes.
14788 (struct linux_target_ops): New.
14789 (extern the_low_target): New.
14790 * linux-low.c (num_regs, regmap): Remove declarations.
14791 (register_addr): Use the_low_target explicitly.
14792 (fetch_register): Likewise.
14793 (usr_fetch_inferior_registers): Likewise.
14794 (usr_store_inferior_registers): Likewise.
14795 * linux-arm-low.c (num_regs): Remove.
14796 (arm_num_regs): Define.
14797 (arm_regmap): Renamed from regmap, made static.
14798 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14800 (arm_cannot_store_register): Renamed from cannot_store_register,
14802 (the_low_target): New.
14803 * linux-i386-low.c (num_regs): Remove.
14804 (i386_num_regs): Define.
14805 (i386_regmap): Renamed from regmap, made static.
14806 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14808 (i386_cannot_store_register): Renamed from cannot_store_register,
14810 (the_low_target): New.
14811 * linux-ia64-low.c (num_regs): Remove.
14812 (ia64_num_regs): Define.
14813 (ia64_regmap): Renamed from regmap, made static.
14814 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14816 (ia64_cannot_store_register): Renamed from cannot_store_register,
14818 (the_low_target): New.
14819 * linux-m68k-low.c (num_regs): Remove.
14820 (m68k_num_regs): Define.
14821 (m68k_regmap): Renamed from regmap, made static.
14822 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14824 (m68k_cannot_store_register): Renamed from cannot_store_register,
14826 (the_low_target): New.
14827 * linux-mips-low.c (num_regs): Remove.
14828 (mips_num_regs): Define.
14829 (mips_regmap): Renamed from regmap, made static.
14830 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14832 (mips_cannot_store_register): Renamed from cannot_store_register,
14834 (the_low_target): New.
14835 * linux-ppc-low.c (num_regs): Remove.
14836 (ppc_num_regs): Define.
14837 (ppc_regmap): Renamed from regmap, made static.
14838 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14840 (ppc_cannot_store_register): Renamed from cannot_store_register,
14842 (the_low_target): New.
14843 * linux-s390-low.c (num_regs): Remove.
14844 (s390_num_regs): Define.
14845 (s390_regmap): Renamed from regmap, made static.
14846 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14848 (s390_cannot_store_register): Renamed from cannot_store_register,
14850 (the_low_target): New.
14851 * linux-sh-low.c (num_regs): Remove.
14852 (sh_num_regs): Define.
14853 (sh_regmap): Renamed from regmap, made static.
14854 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14856 (sh_cannot_store_register): Renamed from cannot_store_register,
14858 (the_low_target): New.
14859 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14860 (the_low_target): New.
14862 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14864 * Makefile.in: Add stamp-h target.
14865 * configure.in: Create stamp-h.
14866 * configure: Regenerated.
14868 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14870 * inferiors.c: New file.
14871 * target.c: New file.
14872 * target.h: New file.
14873 * Makefile.in: Add target.o and inferiors.o. Update
14875 * linux-low.c (inferior_pid): New static variable,
14876 moved from server.c.
14877 (linux_create_inferior): Renamed from create_inferior.
14878 Call add_inferior. Return 0 on success instead of a PID.
14879 (linux_attach): Renamed from myattach.
14880 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14881 (linux_thread_alive): Renamed from mythread_alive.
14882 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14884 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14885 (regsets_store_inferior_registers): Correct error message.
14886 Add missing ``return 0''.
14887 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14888 (linux_store_registers): Renamed from store_inferior_registers.
14889 (linux_read_memory): Renamed from read_inferior_memory.
14890 (linux_write_memory): Renamed from write_inferior_memory.
14891 (linux_target_ops): New structure.
14892 (initialize_low): Call set_target_ops ().
14893 * remote-utils.c (unhexify): New function.
14894 (hexify): New function.
14895 (input_interrupt): Send signals to ``signal_pid''.
14896 * server.c (inferior_pid): Remove.
14897 (start_inferior): Update create_inferior call.
14898 (attach_inferior): Call add_inferior.
14899 (handle_query): New function.
14900 (main): Call handle_query for `q' packets.
14901 * server.h: Include "target.h". Remove obsolete prototypes.
14902 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14904 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14906 * Makefile.in: Add WARN_CFLAGS. Update configury
14908 * configure.in: Check for <string.h>
14909 * configure: Regenerate.
14910 * config.in: Regenerate.
14911 * gdbreplay.c: Include needed system headers.
14912 (remote_open): Remove strchr prototype.
14913 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14914 * regcache.c (supply_register): Change buf argument to const void *.
14915 (supply_register_by_name): Likewise.
14916 (collect_register): Change buf argument to void *.
14917 (collect_register_by_name): Likewise.
14918 * regcache.h: Add missing prototypes.
14919 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14920 * server.c (handle_query): New function.
14921 (attached): New static variable, moved out of main.
14922 (main): Quiet longjmp clobber warnings.
14923 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14924 * utils.c (error): Remove NORETURN.